$_POST problem
Posted by: bassel (193.227.170.---)
Date: June 19, 2009 03:57PM

I'm a senior web developer and i used to work using the wamp for long time, but i faced recently a sudden problem.

I install a fresh copy of wamp 2.0h on a new computer XP SP2, it worked correctly for one month, but now when i try to POST something, it posted twice so each record entered the DB twice and even if i try to upload file, it's been uploaded twice.

i restarted the wamp, it worked fine for a little time then the problem occurred again.
i tried to uninstall it and reinstall again, the same problem is still here.

I notice by accident that this problem occurs only for large files and in firefox only.

thank you in advance for your help.



Edited 2 time(s). Last edit at 06/19/2009 04:12PM by bassel.

Options: ReplyQuote
Re: $_POST problem
Posted by: toumimi (---.100.116-78.rev.gaoland.net)
Date: June 19, 2009 04:30PM

Hi,

Problem is not from Wamp.
it depends of how browsers manage $_POST and header...

You can use some tips to avoid it.
- Add a $_SESSION['already_post'] for example
<?php
if (isset($_SESSION['already_post'])) echo 'Can\'t submit twice';
else {
   $result = mysql_query("INSERT INTO ..."winking smiley;
   $_SESSION['already_post']=1;
}
?>

- Use an intermediate page.
I often use a page which control datas, do query then go back to the first page..

Florian

WampServer Patch (Screenshots)
Topic EN : www.wampserver.com
Topic FR : www.wampserver.com

Options: ReplyQuote


Sorry, only registered users may post in this forum.