UPDATE MySQL
| From: | vernon | Date: | Wed, 13 Nov 2002 22:20:51 +0000 |
| Subject: | UPDATE MySQL | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-124326@lists.php.net to get a copy of this message | ||
Can anyone tell me what's wrong with theis code. I don't get any errors but
the databse is never updated:
<?php
$hostname_connPENPALS = "localhost";
$database_connPENPALS = "phpenpals";
$username_connPENPALS = "username";
$password_connPENPALS = "password";
$connPENPALS = mysql_pconnect($hostname_connPENPALS,
$username_connPENPALS, $password_connPENPALS) or die(mysql_error());
$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);
header("Location: successfullogin.php");
?>