http://www.freewebmasterhelp.com/tutorials/phpmysql/3
and I need help, when I go to the thing (http://localhost/insertjohn.php)
nothing shows witch is OK but then when I check the database, nothing has been inserted.
I'm using this
Code: Select all
<?
$hostname="localhost";
$username="name";
$password="password";
$database="contacts";
mysql_connect($hostname,$username,$password);
@mysql_select_db($database) or die( "Unable to select database");
$query = "INSERT INTO contacts VALUES ('','John','Smith','01234 567890','00112 334455','01234 567891','johnsmith@gowansnet.com','http://www.gowansnet.com')";
?>Is something wrong with the code, or is something wrong with the database?