-
Parse error: syntax error, unexpected '=' in datadase.php
I have a register form and when I fill everything in and go to the next page it gives me this 1 error.
Parse error: syntax error, unexpected '='in D:\Hosting\5476681\html\database.php on line 12. (Line 12 is town/city)
Code:
$firstname=mysql_real_escape_string($_POST['firstname']); //This value has to be the same as in the HTML form file
$lastname=mysql_real_escape_string($_POST['lastname']); //This value has to be the same as in the HTML form file
$email=mysql_real_escape_string($_POST['email']); //This value has to be the same as in the HTML form file
$address1=mysql_real_escape_string($_POST['address1']); //This value has to be the same as in the HTML form file
$town/city=mysql_real_escape_string($_POST['town/city']); //This value has to be the same as in the HTML form file
$state/county=mysql_real_escape_string($_POST['state/county']); //This value has to be the same as in the HTML form file
$zip/postcode=mysql_real_escape_string($_POST['zip/postcode']); //This value has to be the same as in the HTML form file
$country=mysql_real_escape_string($_POST['country']); //This value has to be the same as in the HTML form file
$month=mysql_real_escape_string($_POST['month']); //This value has to be the same as in the HTML form file
$day=mysql_real_escape_string($_POST['day']); //This value has to be the same as in the HTML form file
$year=mysql_real_escape_string($_POST['year']); //This value has to be the same as in the HTML form file
$question=mysql_real_escape_string($_POST['question']); //This value has to be the same as in the HTML form file
$answer=mysql_real_escape_string($_POST['answer']); //This value has to be the same as in the HTML form file
$username=mysql_real_escape_string($_POST['username']); //This value has to be the same as in the HTML form file
$password1=mysql_real_escape_string($_POST['password1']); //This value has to be the same as in the HTML form file
$password2=mysql_real_escape_string($_POST['password2']); //This value has to be the same as in the HTML form file
-
Hi,
$town/city is no good php variable name.
$town_city or $townCity would be better
Musicman
-
Bearded (M|G)od
You can't POST variable names like that either, as I see you are trying to do. I'm honestly not even quite sure what results you'll get from that, I've never done it, but it's not valid by any means.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|