here's how I finally did it with help from people here and other places.
What do you think?
function calcElapsedTime ($pageVar, $timeVar) {
// calculates elapsed time in seconds
$seconds = intval((time()-$timeVar));
// puts in that and the associated page in a database
$conn = mysql_pconnect( 'yourhost', 'useridentifica tion',
'yourpassword') or die(mysql_error ());
mysql_select_db ('databaseName' , $conn);
$query = "INSERT INTO databaseTable VALUES ('".$pageVar."' ,
'".$seconds."') ";
$result = mysql_query($qu ery, $conn);
}
What do you think?
function calcElapsedTime ($pageVar, $timeVar) {
// calculates elapsed time in seconds
$seconds = intval((time()-$timeVar));
// puts in that and the associated page in a database
$conn = mysql_pconnect( 'yourhost', 'useridentifica tion',
'yourpassword') or die(mysql_error ());
mysql_select_db ('databaseName' , $conn);
$query = "INSERT INTO databaseTable VALUES ('".$pageVar."' ,
'".$seconds."') ";
$result = mysql_query($qu ery, $conn);
}
Comment