PHP - Uk Newbee Hello To All
hello all merry christmas
new to all this allways needsome help
Similar TutorialsHi I need to set up a web page that will allow users to find a location. I have set up a web form where a user can search by country, state or postal code. Now I need to find a php code that will let me display the information into a web page. I am also going to need to create a database that will house the information that I want to display. Like street map, street address and phone number. Please tell me there is a generic form out there that I can use and easily editable. Thank You! Ok, I consider myself a dabbler in programming so bear with me. What I need to do sounds fairly simple, but I cannot figure it out. I have an html page. Inside is some basic html and some Javascript. The javascript basically generates a random value consisting of numbers and characters in: var = randomToken. The length of the random value generated is 11 characters on chrome and 19 on FF? I have no idea why the discrepancy between browsers, but that's not a problem. I'll look into that later. What I'm having trouble doing is right now, I need to take that random value that was generated by a javascript function and save it out to a database, so on the other end, when someone browses to another page, I need to retrieve the saved value from the database. I've looked at many examples but they always include a bunch of stuff I don't need, like tables, multiple stuff in the database, etc. All I need to do is be able to store a variable and later read it out of a database. The database just needs a field to store the random value. Nothing else is needed in the database (for now anyway). I know I need php, but i am super green at using it. I have a mysql database/table built with field: randomVar So in a nutshell: The starting html page needs to: Generate random value in Javascript. Save it in a variable. Done. Pass it to php Not Done Update the database randomVar with the random value Not Done Zero out the randomVar field in the database at some point. (when originator hits stop button or closes the page.) Not DoneAnother html page needs to: PHP Read the randomVar from the database; if > 0 use it Not Done If = 0, echo back some text to the html page....like "Try Later... Not Done Pass it to javascript Not DoneI am not looking for the exact code unless you want to supply it? :) Thanks, Ray
|