<?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>
";
?>
try this, this allows you to load the page, press submit once, and not
again.
--
Chris Lee
Mediawaveonline.com
ph. 250.377.1095
ph. 250.376.2690
fx. 250.554.1120
[EMAIL PROTECTED]
"Kurth Bemis" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> i have a form set that my users can fill out thier information. at the
end
> of the process the results are mailed to an email address. then only
> problem is that reloads the page the mail is send again. this can be a
> problem...any ideas on how to prevent it??
>
> ~kurth
>
>
> --
> 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]
>
--
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]