I use some functions from an .inc file to authenticate users and create a session.
The test scripts have been run on a W2k Srv, and, amazingly, it works fine!
On the Linux server where the final version is supposed to run, however, I get this error message:
Warning: Missing argument 1 for session() in /home/hostmaster/INC/sessions.inc on line 48
Line 48 is the line "function session ( $id )":
function session ( $id ) {
mysql_connect ( "$server", "$user", "$pw" );
mysql_select_db ( "$db" );
$result = mysql_query ( "SELECT timestamp FROM general WHERE id=$id" );
list ( $lasttime ) = mysql_fetch_array ( $result );
$nowtime = time ();
if ( $nowtime < ( $lasttime + 900 ) ) {
mysql_query ( "UPDATE general SET timestamp='$nowtime' WHERE id=$id" );
return ( "true" );
} else { return ( "false" ); }
}