As the title says.
The form or my query is playing a trick on me 🙁
It enter a 1 inside my database instead of what Im writing in the form.
This is my form
<form action="deleteupdate.php" method="post">
<div id="txtHint"></div>
<input type ="submit" name="submittype" value ="Delete">
<input type ="submit" name="submittype" value ="Update">
category: <input type="text" name="category" />
</form>
And the query in deleteupdate.php
else if($_POST['submittype']=="Update"){
mysql_query("INSERT INTO `category`(`category`)
VALUES (category='$category')") ;
}
Shouldn’t this work ?
$category doesn’t exist in your script.
Use this code: