Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Form related question
December 28, 2005, 11:23 am
rate this thread
I am looking at adding a form to my site allowing visitors to
subscribe with a username. The form should ideally first check
to see if the username has been taken (From text file or MYSQL database)
and then submit the form to my email address. If the username is taken it
should return a message to the user advising them of this.
Can anyone perhaps assist with this or direct me to a tutorial for the
checking of the username part? The rest of the form is working.
Re: Form related question
is a match you could do one of two things:
Set a session variable with an error message and call the page again.
or call the page again with the error message as the parameter.
In either case you would display the message in the form area. In the
first method you would then unset the variable. In the second method
you would set a vaiable near the beginning of the code using $_GET and
it would be this variable you would later display.
On success you would go somewhere else. The calling would be don with