Posted by Shelly on 11/14/06 12:09
"lorento" <laurente1234@yahoo.com> wrote in message
news:1163479079.196206.270300@m73g2000cwd.googlegroups.com...
> Shelly wrote:
>
>> If I do a submit and have it come back to the same page, all is fine. If
>> I
>> now click the browser refresh button, I get another submittal.
>
> Its browser behaviour we can't do anything with php. If you do not want
> another submittal when you refresh it, use GET method instead of POST.
I wrote a test script with get. It still goes in there.
<?php
session_start();
if (!isset($_SESSION['count'])) $_SESSION['count'] = 0;
if (isset($_GET['test'])) {
echo "Got inside get... <br>";
echo "text=" . $_GET['text'] . "<br>";
$_SESSION['count'] += 1;
if ($_GET['text'] != "get") {
echo "count=" . $_SESSION['count'] . "<br>";
}
$foo = "get";
}
?>
Navigation:
[Reply to this message]
|