Hi guys,
I am currently implementing a membership login on my website, the user fills in certain information to register such as name, email address, desired username and password.
I have a seperate HTML file containing the code for the form, and then a php file to add the new user to the mysql database.
I have been following this tutorial from a book, however I have come across an issue whereby, when the user first visits the 'join page' the php tags show up in the form fields. This is a feature so that if the verification fails, the attempted values will still remain on the page and the user will not have to click back. However when the user first visits they are seeing the following:
First Name
<br /><b>Notice</b>: Undefined index: first_name in <b>C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\html\forms\user_signup.html</b> on line <b>13</b><br />
I understand that this is because the values are not being defined in the php code, but what is the best way to do this? Set them all to global variables that are empty? i.e: $first_name = ''; ?
I know that I could turn off the 'notification' errors in the php.ini file but I would much prefer to sort them out then have these throughout.
Any help would be much appreciated,
Thanks
Beth 🙂