Well, this is my code, but it dosnt insert any value in database table. I added some values into Database: Mydata.users.firstname and when I type in mySQL monitor: Select firstname From users; then i get my values, but the problem is this. The code dosnt add any value in firstname and dosnt display any error!!
Code: Select all
<?
error_reporting(E_ALL);
$username="Kristian";
$password="mypassword";
$database="mydata";
mysql_connect("localhost",$username,$password);
mysql_select_db($database);
$query = "INSERT INTO users(firstname) VALUES ('MySQL')";
mysql_query($query);
mysql_close();
?>