adding a session to my script. =\. help.
Posted: Fri May 02, 2003 8:24 pm
this is my code, first off.
how could i add a session to this script that would only allow a host to tag once every 60 seconds?
Code: Select all
<?
$xname = "$name";
$xmsg = "$msg";
$xemail = "$email";
$xurl = "$url";
$glog = "guestlog.php";
$fp = fopen ($glog, "r+");
$fp2 = fread ($fp, filesize ("$glog"));
fclose ($fp);
$fp = fopen ($glog, "w");
$split = " - ";
if (!$xname || !$xmsg) {
echo("one or more required fields were left blank. <a href="javascript:history.back(1)">click here</a> to go back.");
}
if ($xname || $xmsg) {
fputs ($fp,"<a href="mailto:$xemail">$xname</a>$split<a href="$xurl">www</a>$split$xmsg<br><br>$fp2");
echo("thank you for your comment, i really appreciate your feedback. <a href="guestlog.php" target="shoutbox">click here</a> to view your comment.");
exit;
}
?>