Web Analytics Made Easy -
StatCounter Parse error: syntax error, unexpected T_STRING in /home/sites/stantech-erst.net/publi - CodingForum

Announcement

Collapse
No announcement yet.

Parse error: syntax error, unexpected T_STRING in /home/sites/stantech-erst.net/publi

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Parse error: syntax error, unexpected T_STRING in /home/sites/stantech-erst.net/publi

    Hi, I am new to Php, i am being showed the above error for the folowing script. Any help or advice would be appreciated. Thanks Lee.

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Untitled Document</title>
    </head>

    <body><?
    $username="web27-recruitmen";
    $password="kgl";
    $database="web27-recruitmen";

    $Ref Number=$_POST['Ref Number'];
    $Job Title=$_POST['Job Title'];
    $Location=$_POST['Location'];
    $Salary=$_POST['Salary'];
    $Description=$_POST['Description'];


    mysql_connect(82.110.105.25,$web27-recruitmen,$kgl);
    @mysql_select_db($web27-recruitmen) or die( "Unable to select database");

    $query = "INSERT INTO Recruitment VALUES ('','$Ref Number','$Job Title','$Location','$Salary','$Description')";
    mysql_query($query);

    mysql_close();
    ?>

    </body>
    </html>

  • #2
    Variables cannot have spaces in them.
    I'm not sure if this was any help, but I hope it didn't make you stupider.

    Experience is something you get just after you really need it.
    PHP Installation Guide Feedback welcome.

    Comment


    • #3
      Thanks

      Thank you,

      Comment


      • #4
        here is link about php variables http://lt.php.net/language.variables
        Free php image upload script
        Personal web developing blog

        Comment

        Working...
        X