RE: [PHP] Calling PHP from an HTML page

From: Date: Sun, 30 Jul 2000 18:44:00 +0000
Subject: RE: [PHP] Calling PHP from an HTML page
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-9123@lists.php.net to get a copy of this message
Of course it could be modified to use MySQL, ahh the beauty of PHP. Say you had a log file as such... (using sprintf to generate a line of the log): sprintf("%s : user ID [%d] went to page ID %s", date(), $id, $url); You could create a mySQL Table: CREATE TABLE log(date TIMESTAMP(8), id INT, url VARCHAR(255)); Then modify your write statements to: mysql_query("INSERT INTO log VALUES(NULL, $id, $url)"); Of course, there is a few more things i didn't mention (connecting to the database, etc) but that's the general gist of it. P.S. Tired? <grin> When was the last time I wasn't working into the wee hours of the morning on PHP code or articles I cannot remember! Regards, John

« previous php.general (#9123) next »