You are here: Re: unsetting « PHP Programming Language « IT news, forums, messages
Re: unsetting

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация