Jump to content

PHP - Expire page after it's loaded instantly


Gamerz

Recommended Posts

if you want a simple form of flood protection, you could create a session, like so

//after you do all the form stuff
$_SESSION['formXYZ_sent'] = true;

 

then simply check if they sent the form already

 

if (isset($_SESSION['formXYZ_sent']) && $_SESSION['formXYZ_sent']){
//form stuff
}
else {
echo "Information already recieved";
}

Wait, I dont get it...

 

So do you put $_SESSION['formXYZ_sent'] = true; on the upload processing page or literally right after the form.

 

And do you put the below code before the actual form? I'm a lil confused

if (isset($_SESSION['formXYZ_sent']) && $_SESSION['formXYZ_sent']){

//form stuff

}

else {

echo "Information already recieved";

}

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.