Click here to Skip to main content
15,892,809 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
this is my error message. "Parse error: syntax error, unexpected $end in /home/content/25/11427125/html/dbConfig.php on line 65"


someone help me out with this error please id be greatful. and line 65 is the last line
C#
include ("signup.html");

// Replace the variable values below
// with your specific database information.
$host = "68.178.142.193";
$user = "RootSpread";
$pass = "Mice11223@";
$db   = "accounts";
// This part sets up the connection to the 
// database (so you don't need to reopen the connection
// again on the same page).
$ms = mysql_pconnect($host, $user, $pass);
if ( !$ms )
{
echo "Error connecting to database.\n";
}
// Then you need to make sure the database you want
// is selected.
mysql_select_db($db);

if ( $_GET["op"] == "reg" )
 {
 $bInputFlag = false;
 foreach ( $_POST as $field )
  {
  if ($field == "")
   {
   $bInputFlag = false;
   }
  else
   {
   $bInputFlag = true;
   }
  }
 if ($bInputFlag == false)
  {
  die("Problem with your registration info.
   Please go back and try again.");
}

$q = "INSERT INTO `accounts` (`firstname`,`initial`,`lastname`,`email`,`password`,`dob`,`number`,`sex`) "

  ."VALUES ('".$_POST["firstname"]."', 
    '".$_POST["initial"]."', 
    '".$_POST["lastname"]."', 
    '".$_POST["email"]."', '"
  ."PASSWORD('".$_POST["password"]."'), '".$_POST["dob"]."', '".$_POST["number"]."', '".$_POST["sex"]."') ";

 $r = mysql_query($q);
 
 if ( !mysql_insert_id() )
  {
  die("Error: User not added to database.");
  }
 else
  {

  Header("Location: index.html");
  }

if( $_GET["op"] == "thanks" )
 {
 echo "<h2>Thanks for registering!</h2>";
}
?> //this is line 65
Posted
Updated 17-Jul-13 7:05am
v3

1 solution

It looks like the opening brace (the "{" character) after the
if ( $_GET["op"] == "reg" )

line doesn't have a closing brace to go with it. (I think - it's hard to read when the code is not clearly indented)
 
Share this answer
 
v2
Comments
CPallini 17-Jul-13 16:35pm    
I guess you are right. 5.
Kevin Miqui 18-Jul-13 10:36am    
i get the same error still even after doing what u told me.
Kevin Miqui 18-Jul-13 10:38am    
im still getting the exact same error.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900