(First, nicely done site, Daynah)
I know that this is probably a stupid question, but we all get our chances for that title once in a while, right? ;-)
I can't &%$$( figure out how come my db isn't accepting the values from my variables. I even took the low road on the debugging and have tons of info kicking out (it's ugly). I can verify the data, I can verify that mysql is taking data in. All I can think of is 1) configuration, or 2) duh, missed something easy and obvious. Here's the code: and following is the output.
~The Code (add2tbl.php) ~~~~
<?
//echo "name is $Name<br><p></p>";
if($Name)
{
mysql_connect("localhost") or die ("Problem connecting to DataBase");
$query = "INSERT into visitors values($TimeStamp, $Name, $Last, $Email, $Comment)";
echo "query is $query<br>";
mysql_select_db("guest_book");
//mysql
$Name="Scott"; $Last="Bailey";
//mysql_query ("INSERT into visitors (Name, Last) values ($Name, $Last)");
$result = mysql_query($query);
$rresult=mysql_query("select * from visitors");
while($row=mysql_fetch_array($rresult))
{
echo (" ".$row["Name"]." ".$row["Last"]."<br>\n");
}
mysql_close();
echo "<br><p></p>";
if($result)
{
echo "result is $result<br><p></p>";
}
else
{
echo "no result<br><p></p>";
}
echo "Thank you your input.<br><p></p>";
}
else
{
echo "error";
}
include ('links.x');
?>
~~~Now, the output:~~~
query is INSERT into visitors values(08/10/2002 08:53:41, t, t, t, t)
Bill Tester
Bill Tester
Bob Simpson
Robert Last
Robert Last
no result
Thank you your input.
These are the links