I have made my Mysql Table link this:
That problem occurs because i am not able to insert auto_increment into my mysql query.
index.php
<?php
$name=$_POST["name"];
$description=$_POST["description"];
$image=$_POST["image"];
$amount=$_POST["amount"];
$sql=mysql_query("INSERT INTO `store`(`id`, `name`, `description`, `price`, `image`) VALUES (NULL,'".$name."','".$description."','".$amount."','".$image."')");
?>
I post to it by a HTML form and it does executes the query but i get no rows in that table. I thnk its because of auto_increment or Unique or Primary. i was told to use NULL
in place of auto_increment value but it doesn't work.
Any Help?
P.S Noob here!
EDIT: error is:
Deprecated: mysql_query(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in D:\xampp\htdocs\Html\Home\index.php on line 9