Re: After INSERT form submit - Data doesn't refresh!
| From: | Rahul S. Johari | Date: | Tue, 22 Jul 2008 14:45:08 +0000 |
| Subject: | Re: After INSERT form submit - Data doesn't refresh! | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-277173@lists.php.net to get a copy of this message | ||
Actually you do have a point. I didn't think about exit()
I can surely use this, and the connection overhead is not of a major concern to me - definitely no more then displaying the newly inserted row - at the same time I would like *not* to abandon a search for an even better code if possible. Unless there doesn't exist any alternates, which still stumps me.
Thanks!
On Jul 22, 2008, at 10:37 AM, Andrew Ballard wrote:
On Tue, Jul 22, 2008 at 10:24 AM, Rahul S. Johari <sleepwalker@rahulsjohari.com> wrote:--- Rahul Sitaram Johari Founder, Internet Architects Group, Inc. [Email] sleepwalker@rahulsjohari.com [Web] http://www.rahulsjohari.comIt works, but it's not the most efficient solution. The page has heavy graphics & text. Using the header("Location: a.php") loads the page in question twice. Slower connections will respond slowly to the page.No, it really doesn't. A redirect should be followed with an exit() to stop execution after the Location header is passed, so you don't need to send all the "heavy text" or the IMG tags to embed the images, and most client browsers will stop rendering the page as soon as they see this header and therefore won't request the "heavy images" in any event. Granted, there is still the connection overhead caused by an additional request.In theory, the header() statements for not using cache should have worked - I'm not sure why they are working. Even Googling the loading from cache problem gives those statements in various places. On Jul 22, 2008, at 10:16 AM, Jason Pruim wrote:(I hope this doesn't get lost in all the top posting on this thread.) Andrew --PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.phpWithout seeing the code it's hard to tell.. But couldn't you just use a header("Location: a.php"); after the insert statement? Or is that too ugly of a hack? :) It works for me on a project I'm working on.