my php code does not insert
I have created my database on Hostmonster using the wizard and PHPadmin. And the database appears fine. I can add to it at PHPadmin. But I can not get this PHP script to work. I cam here because I thought maybe it was a MySQL problem.
/* put it in the database
$username="steve";
$password="password";
$database="_contacts";
mysql_connect("localhost", $username, $password ) or die(mysql_error());
mysql_select_db($database) or die(mysql_error());
mysql_query("INSERT INTO 'data' VALUES('$first','$last','$email','$likeit')");
mysql_close();
/*mail($sendtome,$mesubject,$datamessage);*/
I even copied code from PHPadmin but it stil ldid not work.
Hope someone can help.
Thanks.
Steve
Subject
Written By
Posted
my php code does not insert
April 10, 2010 03:59PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.