I seem to be staring at a needle in the haystack. I´ve created a PHP form to collect data that I am trying to write to my mySQL database. I continue to get this error everytime I submit the form:
Parse error: syntax error, unexpected T_VARIABLE in /homepages/41/d439316937/htdocs/php/update.php on line 18
I´ve double checked all of the variables and can´t seem to find the problem. Below is the PHP
[php]
update.php <?php $stid = $_POST['stid']; $station = $_POST['station']; $line = $_POST['line']; $con_1 = $_POST['con_1']; // Mysql connect------------- mysql_connect ("db439631507.db.1and1.com", "dbo439631507", "********") or die ('Error ' . mysql_select_db ("db439631507") //Mysql Query----------------THe next line SEEMS TO BE WHERE THE PROBLEM LIES---------------------$query=“INSERT INTO metro_station (stid, station, line, con_1) VALUES
(‘NULL’,’”.stid."’,’".station."’,’".line."’,’".con_1."’
//Status report------------
mysql_query($query) or die (‘Error updating database’);
echo "Database updated with: “.$stid.” “.$station.” “.$line.”
“.$con_1.”;
?>
[/php]Table: metro_station
The data fields in mySQL are:
stid
station
line
con_1
I´m new to PHP, and this seems to be an achilles heel. Any help would be appreciated.
Thanks
John