Hi all,
Why won't this script update my database?
melb_edit_cat1.php
$query = "SELECT * FROM categories WHERE CatID = $id";
$result = mysql_query($query);
while($row = mysql_fetch_array($result)){
echo "<font face=Verdana, Arial size=2><b>Edit category details:</b></font><br>";
echo "<hr><br>";
echo "<form method=post action=\"add_edit_cat1.php\">";
echo "<font face=Verdana, Arial size=2 color=red><b>Category:</b></font><br>";
echo "<input type=text name=address maxlength=100 size=25 value=\"{$row['CatName']}\"><br><br><br>";
//echo "<input type=checkbox name=active value=yes> Check here to <b>display</b> this property on Melbourne Central<br><br>";
echo "<input type=submit value=\"SUBMIT\">";
echo "<input type=hidden name=bullet value=$id>";
echo "</form>";
Here is part of the script that is executed when the form is submitted.
add_edit_cat1.php
$query = "UPDATE categories SET CatName='$CatName' WHERE CatID=$bullet";
Everything appears to work but instead of updating the database with the new entry it leaves an empty value.
Any ideas on what the problem might be?
Cheers,
Rhett