Hi all,
I've only been using PHP for about 4 days now and I've encountered my first puzzling problem.
The following code gets me a parse error on line 10. I've checked the syntaxes and have also used similar code elsewhere and it works perfectly.
<?php
include("survey.inc");
$connection=mysql_connect($host,$user,$password)
or die ("Couldn't connect to the server");
$db=mysql_select_db($database,$connection)
or die ("Couldn't select database");
$sql="INSERT INTO test (q1,q2,q3,q4)
VALUES ('$age','$length','$eecategory','$dept');
$result=mysql_query($sql)
or die ("Couldn't execute query.");
?>
age, length, eecategory and dept are radio buttons on a form. I need to input the values into the database.
Really hope someone can help.
Thanks a lot!
Sharon