I suggest you echo the query to see whether it is what you are expecting. Modifiy the part where you construct the query like this:
// put the query in a variable
$q = "UPDATE books SET Title ='$title_save', Price ='$price_save', Stock='$stock_save' WHERE Code= '$code'";
// submit query using the variable
mysql_query($q) or die(mysql_error();
// add this to display the query
die($q);
Now you will be able to see if the query gets constructed OK and you can copy it to phpmyadmin or mysql client and test it.
Two other notes:
- your form has no </form> tag. It should be after </table> tag.
- your form is missing an action attribute (I think it is required)
broj1
Nearly a Posting Virtuoso
1,212 posts since Jan 2011
Reputation Points: 167
Solved Threads: 164
Skill Endorsements: 13