Ok, I'm sure this is the dumbest question ever, but I don't really know how to ask it to Google. How does one pass/keep variables when using multiple PHP pages. Can you use the page your on to process itself? For example, when logging in here, if you enter an invalid user name or password, the same page is shown with the error message. How do you do that?
I am asking for the user to create a user name. I would like to search the database to see if that name is available, and take the appropriate action, such as prompting for a different user name or allowing the person to continue registering, without having to leave the page (it would be cool if they wouldn't have to hit submit, but, this is server side not client side).
Background: I am creating a database for which people will register to for a bicycle tour. Some users, however have already been to the event. The first page asks if they have been to the event, and if they have it asks for their first and last name. Page 2 prompts the user to update his/her info or, if new, to register. Then I move on to page 3 which either Updates the row or inserts a row. The dilemma is passing the "found" data from page 2 to page 3. For now, I pass the first and last name to page 3 using POST.
On page 2 I am asking for the user to create a user name. I would like to search the database to see if that name is available, and take the appropriate action.
P.S. If anyone knows of a free, pre-built application that can be modified to my situation, that would be great. Getting the user info and updating/inserting it into the database is the easy part. Securing it and considering all the possible mistakes takes 10 times more code than the querying!
Thanks!😕