try this, your code example has some design flaws.

<?php

 include_once('session.egn');

 if (isset($HTTP_POST_VARS['submit']))
  if ( isset($HTTP_SESSION_VARS['done']) AND $HTTP_SESSION_VARS['done'] == $PHP_SELF)
  {
   echo "a <br>\n";
   echo "You can only press submit once <br>\n";
   exit();
  } else
  {
   echo "b <br>\n";
   $done = $PHP_SELF;
   session_register('done');
  }

 // do some code

 echo "
 <form method='post' action='$PHP_SELF'>
 <input type='hidden' name='submit' value ='1'>

 <input type='submit'>
 </form>
 ";

?>

im not exactly sure on what

    if (issset($userfile))
    {
        global $userfile;
        unset($userfile);
    } else
    {
        // do some code
    }

this is supposed todo, what is the global there for? what does it do? please explain.


-- 

 Chris Lee
 Mediawaveonline.com

 ph. 250.377.1095
 ph. 250.376.2690
 fx. 250.554.1120

 [EMAIL PROTECTED]


"Dhaval Desai" <[EMAIL PROTECTED]> wrote in message 
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Hi!


Well I need help with something. I have a form which
has a ction to a file called actio.php
Now When I hit the submit button. It goes to the file
and it performs a certain action as seen below:

action.php: is as follows:

<?php

if(isset($userfile))
{
echo "$userfile is set";
global $userfile;
unset ($userfile);
}
else
{
echo "Sorry buddy , Userfile is not set";
}


?>


My main intentyion is to unset the variable so that
When the page is REFRESHED or RELOADED. It should
execute the else code block.


I am trying to implement it on one of my websites
where users can not refresh a particular a page.


Thank You
Dhaval Desai




__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to