on 14/11/02 8:20 AM, vernon ([EMAIL PROTECTED]) wrote:

> 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");
> ?>

Try adding the line

echo mysql_error();

after the line

$result = mysql_query($myquery, $connPENPALS);

This should tell you if you have a mysql error... if not, then we can look
at other things..



Justin French
--------------------
Creative Director
http://Indent.com.au
Web Developent & 
Graphic Design
--------------------


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to