RE: [PHP] Form duplicate post problem

2002-12-29 Thread Pag
Got it to work. I removed everything except the PHP script. Works like a charm, no problem on the browser back button. Great help from you guys. Thanks a lot! Pag -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Form duplicate post problem

2002-12-29 Thread Jason Sheets
You can also enable output buffering on your middle page, this will allow you to output data and set cookies, send headers, etc at any point in your script. You can enable output buffering globally with php.ini, with an .htaccess for specific directories or use the output buffering functions to en

RE: [PHP] Form duplicate post problem

2002-12-29 Thread John W. Holmes
> >Yeah, you should be using a header() redirect, not a javascript or META > >REFRESH redirect... > > Well, i tried, but i get an error saying that all the headers > were > already sent to the browser. :-P > I used: > > header('Location: http://www.blahblah.com etc'); >

RE: [PHP] Form duplicate post problem

2002-12-29 Thread Michael J. Pawlowsky
2 ways around that.. make sure you send that before any other ouput... Even empty lines etc In other words nothing before Not ever a carriage return. or start of with ob_start() and end with ob_end_flush(); *** REPLY SEPARATOR *** On 29/12/2002 at 7:12 PM Pag wrote: >

RE: [PHP] Form duplicate post problem

2002-12-29 Thread Pag
Yeah, you should be using a header() redirect, not a javascript or META REFRESH redirect... Well, i tried, but i get an error saying that all the headers were already sent to the browser. :-P I used: header('Location: http://www.blahblah.com etc'); I placed

RE: [PHP] Form duplicate post problem

2002-12-29 Thread John W. Holmes
> > One thing that popup would prevent would be the browser > history, i > > mean, if that popup method worked, if the user clicked on the "back" > > browser button, it would take him to where he came from. If i use that > > redirect method, the back button takes him to the redirect. Still

Re: [PHP] Form duplicate post problem

2002-12-29 Thread Jason Wong
On Monday 30 December 2002 01:40, Pag wrote: > One thing that popup would prevent would be the browser history, i > mean, if that popup method worked, if the user clicked on the "back" > browser button, it would take him to where he came from. If i use that > redirect method, the back but

Re: [PHP] Form duplicate post problem

2002-12-29 Thread Pag
Maybe I'm missing something here but I'm not sure why you consider it more user friendly to pop-up a window (and have it disappear automatically). If I was a user I would be thinking "what the hell was that?". And if their connection was fast enough that they don't even notice the window pop-up

Re: [PHP] Form duplicate post problem

2002-12-29 Thread Jason Wong
On Sunday 29 December 2002 23:24, Pag wrote: > This post is merely for reference and, hopefully, to help out some > other person that runs into the same problem. > > I solved my duplicate form post problem using that middle-man > technique you guys mentioned, but i did it in a li

RE: [PHP] Form duplicate post problem

2002-12-29 Thread Pag
Also for reference, but I would recommend to everyone that they not rely on Javascript and simply do all of this in the main window. With Pop-Up Blockers and different browser versions, Javascript should be avoided if possible unless you really know what your audience will be using (or don't car

RE: [PHP] Form duplicate post problem

2002-12-29 Thread John W. Holmes
> >You can still use one page and use a "middle-man" technique. The part > >that processes the form input would redirect back to itself after the > >data is inserted into the database, thus getting rid of the post data. > >So subsequent refreshes of the page will refresh without attempting to > >re

RE: [PHP] Form duplicate post problem

2002-12-29 Thread Pag
You can still use one page and use a "middle-man" technique. The part that processes the form input would redirect back to itself after the data is inserted into the database, thus getting rid of the post data. So subsequent refreshes of the page will refresh without attempting to repost the dat

Re: [PHP] Form duplicate post problem

2002-12-28 Thread Michael J. Pawlowsky
You can close it with JavaScript. Something like function open_a_window_please(){ lovechild = window.open("childpage.htm"); Now we have a name that can tell the browser which window to close. We're ready to use the "window.close()" method. In the parent page add the following closing link:

Re: [PHP] Form duplicate post problem

2002-12-28 Thread Pag
The redirect using the header method is instant and if the middle page just does the inserts and you redirect right away using PHP it is not noticable at all. I gave up on reinventing the wheel and i am trying to use that middle-page method you guys mentioned. To make things a little

Re: [PHP] Form duplicate post problem

2002-12-28 Thread Timothy Hitchens (HiTCHO)
The redirect using the header method is instant and if the middle page just does the inserts and you redirect right away using PHP it is not noticable at all. Timothy Hitchens (HiTCHO) [EMAIL PROTECTED] If you need PHP hosting with an experienced support team 24/7 then email me today. On Sun,

RE: [PHP] Form duplicate post problem

2002-12-28 Thread John W. Holmes
> >to a new page that displays the success notices etc and if they > >do a back or a refresh nothing will happen as the POST data > >is on the previous now "removed" from history page. > > I understand, but the reason i am trying to stick with just one > page is that i want it to be pract

Re: [PHP] Form duplicate post problem

2002-12-28 Thread Pag
to a new page that displays the success notices etc and if they do a back or a refresh nothing will happen as the POST data is on the previous now "removed" from history page. I understand, but the reason i am trying to stick with just one page is that i want it to be practical. I me

Re: [PHP] Form duplicate post problem

2002-12-28 Thread Timothy Hitchens (HiTCHO)
There is a very simple solution to this on the page that does the entries into the database simply to a header redirect to a new page that displays the success notices etc and if they do a back or a refresh nothing will happen as the POST data is on the previous now "removed" from history page. he

[PHP] Form duplicate post problem

2002-12-28 Thread Pag
Hi, I am having some problems with duplicate form input. I have a form that adds comments to an article, works fine, but if the user clicks on "refresh", having added a comment previously, the same comment is added again. I tried clearing the variables after the database write, but the refr