A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Parse error: syntax error, unexpected '=' in datadase.php

  1. #1
    Member
    Join Date
    Jan 2009
    Posts
    43

    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

  2. #2
    Registered User
    Join Date
    Feb 2001
    Posts
    13,044
    Hi,

    $town/city is no good php variable name.
    $town_city or $townCity would be better

    Musicman

  3. #3
    Bearded (M|G)od MyFriendIsATaco's Avatar
    Join Date
    Dec 2002
    Location
    Awesomeville.
    Posts
    3,046
    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
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center