Hi guys
Im fairly new to php but I have a little exerience,
I have been reading PHP5 and Mysql bible from wiley and hoping one of you guys have the same book or can point me to a similar resource.
Ok so far the book is great and i can understand most of it but this has me a little confused with the user authentication part,
On page 828 on the second line down it reads
if ($submit == 'Mail confirmaion'){
now as i understand this will perform said action between {} if this case is true however i cant seem to find any other reference to this varible in any of the sample code so whats it doing there? from what i ca see $submit will always be false. so why have it there???
this is in a user registration form and i would expect maybe this to be used to tell the script to process the users data once the form has been submitted instead of displaying the form again.
The only thing i can see is this
at the end of the page the last form object is the submit button
<INPUT TYPE="SUBMIT" NAME="submit" VALUE="Mail confirmaton">
so i would assume that at the beginning the posted value of "submit" should be assigned to variable $submit
ie $submit = $_POST['submit'];
then
if ($submit == 'Mail confirmation') {process the details}
else {show the form}
if anyone can explain id be greatful
Thanks
Matt