Hi,
I can't seem to insert data into MySQL from php. When I execute a sql command via php a record gets created in a table, but no data is inserted.
I am trying to pass form data using variables using post in the url. So when url?first=john gets passed to the .php page that containes the insert statement of
<?php
$db = mysql_pconnect("localhost", "id", "password");
mysql_select_db("mydb",$db);
$sql = "INSERT INTO text (id) VALUES('$first')";
$result = mysql_query($sql);
echo mysql_errno().": ".mysql_error();
echo "Thank you! Information entered.\n";
?>
no data is inserted. Any ideas?