Ok Im having some troubles with PHP and MySQL.
<?php
$username = "ffextreme";
$password = "ffextreme";
$hostname = "localhost";
$dbh = mysql_connect($hostname, $username, $password)
or die("Unable to connect to mysql");
print "Connected to MySql<br>";
if (mysql_query("INSERT INTO ffxitems(name,info,price) values('Potion','Heals Character by 50 Points','100')")) {
print "Successfully Inserted Item";}
else {
print "Failed to Insert Item";
}
mysql_close($dbh);
?>
In the database I have a table called ffxitems and it has 4 columns, first is ID and its auto_increment and then name, then info, then price.
This code always gives me back "Failer to Insert Item" why? It connects the database fine I know that much.