Hey all.
I'm brand new at PHP so please bare with me.
I'm building a PHP script that has a form and an upload script. The html is emeded in the PHP script.
I'm trying to figure out how to only allow the user to fill out the form once during a sesssion.
I got some help and the script they gave me was:
<?php
session_start();
if(!isset($SESSION['allow'])) {
// Display form here
$SESSION['allow'] = 1;
} else {
echo "You have already filled out this form this session.";
}
?>
This worked at first, but now I'm making my script a little more complicated.
Can anyone explain to me, and maybe give me some examples of what the above script is actually doing?
For example in //$_SESSION['allow'] =1; what does the "1" represent. I've also tried to find some documentation on "allow" but I haven't found any up to this point. What is the "allow" actually telling the session to do?
Thanks in advance for your help. I think I can figure out the problems I'm having in the more complex script if I know exactly what the session script is saying.
Thanks!!!