Code: Select all
$uploadid = $_SESSION['loginID'];
$uploaddate = date("j-n-y, G:i:s");
echo ("uploadid is $uploadid<BR>");
echo ("uploaddate is $uploaddate<BR>");
echo ("description is: $newdesc<BR>");
// setup SQL statement
$sql="UPDATE memgallery SET gal_desc='$newdesc', upload_id='$uploadid', upload_date='$uploaddate' WHERE gal_id='$gal_id'";
// execute SQL statement
$result = mysql_db_query($dbname,"$sql",$link);
// check for errors
if (!$result) { echo("ERROR: " . mysql_error() . "\n$sql\n"); }
echo "The Description has been updated";I use the same code for another table and it works fine
Code: Select all
//create short names from form information
$new_prof_name = $_POST["new_prof_name"];
$new_profile = $_POST["new_profile"];
// Remove unwanted characters from input
$new_profile = AddSlashes($new_profile);
$new_profile = nl2br($new_profile);
// setup SQL statement
$sql="UPDATE memprofile SET prof_name='$new_prof_name', profile='$new_profile' , upload_date='$changedate' where upload_id='$loginid'";
// execute SQL statement
$result = mysql_db_query($dbname,"$sql",$link);
// check for errors
if (!$result) { echo("ERROR: " . mysql_error() . "\n$sql\n"); }
echo "Your Profile has been updated";Can someone help please or am In the wrong forum.