[PHP] Re: Help Formatting String into URL

2004-07-10 Thread Frank Voorburg
Ryan, You can use the following function: function FormatUrl($url) { if (eregi("www", $url)) $result = "http://$url";; else $result = "http://www.$url";; return $result; } You can test it using: $test1 = FormatUrl("google.com"); $test2 = FormatUrl("www.google.com"); print "test1 =

[PHP] MySql DB access upon browser close

2004-07-06 Thread Frank Voorburg
Hi, Any help with the following is appreciated. I want to use php to store the time that a user spent on 1 particular webpage in a mysql database. What I'm trying to do now is: 1) using Javascript's OnLoad event I read out the time when the user 1st opens the webpage 2) using Javascript's OnUnLoa