Hi all, newbie who is stumped:
I am trying to let a user select a category from a form to update the category information. I am having trouble matching up the form variable and then pulling it from the database. I know I am doing something wrong which is pretty basic, but can't figure it out. The form field passed from the form will exactly match the data field in the database (ie, no room for error, as the user selects only from a drop down generated from the db in the first place. Thanking your help in advance:
<?
// include function files for this application
require_once("book_sc_fns.php");
$POST['catid'] = addslashes($POST['catid']);
admin_header();
echo "<BR><FONT FACE='ARIAL, HELVETICA' SIZE='1' COLOR='333366'>To update your category, change the information below and click submit. <BR>Your category information will be updated in your cart database<BR>";
@ $db = mysql_pconnect("localhost", "root", "root");
if (!$db)
{
echo "Error: Could not connect to database. Please try again later.";
exit;
}
mysql_select_db("book_sc");
$query = "SELECT catid, cat_image_type FROM categories WHERE ".$_POST['catid']." like '%".$catid."%'";
$result = mysql_query($query);
do_html_footer();
?>