Re: UPDATE MySQL
| From: | Vernon Webb | Date: | Thu, 14 Nov 2002 00:23:59 +0000 |
| Subject: | Re: UPDATE MySQL | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-124353@lists.php.net to get a copy of this message | ||
I made some modifications to the code and I do not get ant error messages,
but the database is still not updated. Here's the code:
<?php
$hostname_connPENPALS = "localhost";
$database_connPENPALS = "phpenpals";
$username_connPENPALS = "username";
$password_connPENPALS = "password";
// SET DATE and SET USER ID SESSION VARAIBLE
$lastaccessdate = gmdate("M d, Y");
$myuserid = $HTTP_SESSION_VARS['svUserID'];
mysql_select_db($database_connPENPALS, $connPENPALS);
$myquery = "UPDATE penpals SET lastaccess='$lastaccessdate' WHERE
ID='$myuserid'";
$result = mysql_query($myquery, $connPENPALS);
echo mysql_error();
// header("Location: successfullogin.php");
?>