RE: [PHP] mysql update help needed
| From: | Rick Emery | Date: | Wed, 20 Mar 2002 19:14:39 +0000 |
| Subject: | RE: [PHP] mysql update help needed | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-89374@lists.php.net to get a copy of this message | ||
if ($postaction=="edit")
-----Original Message-----
From: ROBERT MCPEAK [mailto:RMCPEAK@jhuccp.org]
Sent: Wednesday, March 20, 2002 11:44 AM
To: php-general@lists.php.net
Subject: [PHP] mysql update help needed
Can somebody straighten this out for me?
I can't get the update to work. I'm sure the variables are being
passed to the code. Thanks!
if ($postaction==edit)
{
echo "it fired<Br>";
// process form
$db = mysql_connect("myhost, "myuname",
"mypword");
mysql_select_db("mydb");
$sql = "UPDATE mytable SET
img_url=$img_url,visitdate=$visitdate,img_group=$img_group,display=$display,
caption=$caption where id = $id";
$result = mysql_query($sql);
echo "<center>";
echo "Thank you! Information entered.\n";
echo "</center>";
}
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php