I’ve got this code that is inserting two blank attributes into mysql…its driving me batty and I know it is something simple…You smart folks should be able to figure this out fast!
Here are the php errors reported in the apache log file:
Undefined variable: quote
Undefined variable: author
Here is the code:
Add rows using a form Quote: Author:
<?php if($_POST["add"]){ $link=mysql_connect("localhost","phpuser", "phpuser1"); mysql_select_db("testdb", $link); $query="insert into quotes(quote, author)"; $query.=" values('$quote', '$author')"; $result=mysql_query($query); if ($result) echo "added one row successfully."; }
?>
[code][/code]