Okay, so I tried to make a registration system with PHP and MySQL like many other people do. But when I tested it out, it didn't work. This is my code:
<?php
$Name = $_POST['name'];
$Age = $_POST['age'];
$Email = $_POST['email'];
mysql_connect("HIDDEN","HIDDEN","HIDDEN") or die("Couldn't connect to SQL server.");
mysql_select_db("HIDDEN") or die("Couldn't connect to DB");
$query = "INSERT INTO HIDDEN (id, name, age, email)VALUES ('NULL','".$name."','".$age"','".$email"')";
mysql_query($query) or die("Error updating DB");
echo "DB updated!";
?>
I get the error at line 9, the part with the $query which is like:
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /HIDDEN/HIDDEN/HIDDEN/update.php on line 9
Can anyone tell me what's going wrong here? I'd really like some help...
~Juan
<?php
$Name = $_POST['name'];
$Age = $_POST['age'];
$Email = $_POST['email'];
mysql_connect("HIDDEN","HIDDEN","HIDDEN") or die("Couldn't connect to SQL server.");
mysql_select_db("HIDDEN") or die("Couldn't connect to DB");
$query = "INSERT INTO HIDDEN (id, name, age, email)VALUES ('NULL','".$name."','".$age"','".$email"')";
mysql_query($query) or die("Error updating DB");
echo "DB updated!";
?>
I get the error at line 9, the part with the $query which is like:
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /HIDDEN/HIDDEN/HIDDEN/update.php on line 9
Can anyone tell me what's going wrong here? I'd really like some help...
~Juan