I am trying to add a data into my database and everytime after I click the 'submit' button, the data isn't inserted into the database. Here is my code.
<?php include("/common/sql.php") ?>
<?php
if (isset($_POST['submit']))
{
mysqlquery("INSERT INTO categories (id, name) VALUES('NULL', '$_POST[name]')");
}
?>
<html>
<head>
<title>Add a category</title>
</head>
<body>
<h1>Add a category</h1>
<form action='add_category.php' method='POST'>
<div>
<label>Name: <input type='text' name='name' value=''></label>
</div>
<div>
<input type='submit' value='Add Category'>
</div>
</form>
</body>
</html>
... VALUES( NULL, ..., not... VALUES('NULL', ...