I have a form and PHP code on one page. It shows the form, submits the data and the DB opens. At that point it tries to send the data to the table, and I get a syntax error.
The error is:
Parse error: syntax error, unexpected T_STRING in C:\xampp\htdocs\SCW_Files\formnewbowl.php on line 15
The code:
It includes the menu that called the form, the error is in red:
[php]<?php include("newmenu.php"); ?>
'; echo 'Could not connect!'; } mysql_select_db("scw-db", $con); if(isset($_POST['submit'])){ $sql=INSERT INTO tblsplintersbowlinventory (txtProductBowlCode, txtSpeciesSeq) VALUES('$_POST[bowlcode]‘,‘$_POST[species]‘); if (!mysql_query($sql,$con)) { echo ‘
’; echo $_POST['bowlcode']; echo ” record failed!”; echo ‘Error: ‘ . mysql_error(); } else { echo ‘
’; echo $_POST['bowlcode']; echo ” record added”; } } mysql_close($con); ?>[/php]
Here is the form:
[code]
<div style=”color:blue; serif; text-decoration:underline;”>
Add bowl to database
BowlCode:
SpeciesYear:
[/code]
I am totally lost on why this is happening, any help would be appreciated.
I do see that the PHP above shows everything after line 15 in red, which does confirm it is syntax, but I can’t see what is wrong with it…pollen and new bifocals, not a good combination! :