Hi there, I am making a website at the moment, and it has a create user account page. So, when the user creates an account, they input a name, email and password into the form. Once they have pressed submit, this is then sent to my database, along with a unique user ID. This is basically the last number entered into the database plus 1. However on the same php page, they are presented with a login page. If they enter their details correctly, they can go to stage 3. Now I would easily be able to take the variable via POST to stage 3 if the login varification was on the same page as stage 3, however if goes via a seperate php file. IE. This bit creates the client ID
pass the variables into hidden inputs in the form via php. Then it will go via post with the other stuff onto the last page.
you're using sessions i presume? put it in a session variable and you can basically access it anywhere.
I was thinking of sending it via the form but as its a client ID, it should be openly accessible on each page shouldnt it, without worrying about forms. This $sessions sounds good, ill look it up. Thanks
When you look it up, you'll get more info if you use the correct spelling of it as $_SESSION. For the most part session_start() and actually assigning session values will be the most you need. (you can also use session_destroy when someone clicks to log out) More info is here http://www.php.net/manual/en/book.session.php It may look like a heck of a lot there, but for what you need its quite simple.
Thanks for the tip, its working perfectly. Right now, Im having issues with inserting extra values into mysql table when they fill in another form, i am trying $sql = " UPDATE sellers SET titleOfListing, propertyType, firstline, secondline, postcode, county, price, bedrooms, bathrooms, propertyStatus WHERE email ='$username1'"; dont know why though