Re: [PHP] After INSERT form submit - Data doesn't refresh!

2008-07-23 Thread VamVan
Hello, I understand what you are trying to do. But as a web developer it is never a good practice to have a insert query and page to display the record in the same page. This way you will never add the redundant data whenever the page is refreshed. So from my experience I would suggest you do thi

Re: [PHP] After INSERT form submit - Data doesn't refresh!

2008-07-22 Thread Daniel Brown
On Tue, Jul 22, 2008 at 10:51 AM, Rahul S. Johari <[EMAIL PROTECTED]> wrote: > > I just checked a couple of other browsers (IE, Safari, Opera) and it seems > to be working fine in all the browsers except Firefox 3. I think this issue > is now out of bounds for PHP - I don't think there is anything

Re: [PHP] After INSERT form submit - Data doesn't refresh!

2008-07-22 Thread Rahul S. Johari
I just checked a couple of other browsers (IE, Safari, Opera) and it seems to be working fine in all the browsers except Firefox 3. I think this issue is now out of bounds for PHP - I don't think there is anything wrong in the script or the way I'm doing this - I think the problem is lyin

Re: [PHP] After INSERT form submit - Data doesn't refresh!

2008-07-22 Thread Thijs Lensselink
Quoting "Rahul S. Johari" <[EMAIL PROTECTED]>: No, actually the flow of the program does not work in that order. The flow of the program is in this order: My response was just to fast. Should have read all. At least the order is clear now :) - INSERT row function - INSERT HTML FORM - SE

Re: [PHP] After INSERT form submit - Data doesn't refresh!

2008-07-22 Thread Rahul S. Johari
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 possi

Re: [PHP] After INSERT form submit - Data doesn't refresh!

2008-07-22 Thread Andrew Ballard
On Tue, Jul 22, 2008 at 10:24 AM, Rahul S. Johari <[EMAIL PROTECTED]> wrote: > > It 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,

Re: [PHP] After INSERT form submit - Data doesn't refresh!

2008-07-22 Thread Rahul S. Johari
No, actually the flow of the program does not work in that order. The flow of the program is in this order: - INSERT row function - INSERT HTML FORM - SELECT function to display records Technically the point at which the SELECT statement is executed and pulls records from the mySQL databas

Re: [PHP] After INSERT form submit - Data doesn't refresh!

2008-07-22 Thread Andrew Ballard
On Tue, Jul 22, 2008 at 10:16 AM, Jason Pruim <[EMAIL PROTECTED]> wrote: > Without 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. > > I wou

Re: [PHP] After INSERT form submit - Data doesn't refresh!

2008-07-22 Thread Rahul S. Johari
It 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. In theory, the header() statements for not using cache should have worked - I'm

Re: [PHP] After INSERT form submit - Data doesn't refresh!

2008-07-22 Thread Jason Pruim
Without 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. On Jul 22, 2008, at 9:42 AM, Daniel Brown wrote: On Tue, Jul 22, 2008 at 8:56 AM, Y

Re: [PHP] After INSERT form submit - Data doesn't refresh!

2008-07-22 Thread Daniel Brown
On Tue, Jul 22, 2008 at 8:56 AM, Yeti <[EMAIL PROTECTED]> wrote: > ok, in that case forget the Last-Modified or set it to the current date. > > > header('Last-Modified: '.gmdate('D, d M Y H:i:s', time()).' GMT'); Expanding on this, keep in mind that some people may be as far ahead as GMT +1300

Re: [PHP] After INSERT form submit - Data doesn't refresh!

2008-07-22 Thread Thijs Lensselink
Quoting "Rahul S. Johari" <[EMAIL PROTECTED]>: Here's what it is: I have a php page, "a.php", which contains these three things: - SELECT statement to display records from a mySQL Table - HTML Form for inserting data into the mySQL Table - INSERT statement to insert that row into the mySQL

Re: [PHP] After INSERT form submit - Data doesn't refresh!

2008-07-22 Thread Yeti
ok, in that case forget the Last-Modified or set it to the current date. header('Last-Modified: '.gmdate('D, d M Y H:i:s', time()).' GMT'); Did you turn caching off in your browser and try it then? Or try it with a different browser? On Tue, Jul 22, 2008 at 2:48 PM, Rahul S. Johari < [EMAIL PRO

Re: [PHP] After INSERT form submit - Data doesn't refresh!

2008-07-22 Thread Thiago H. Pojda
On Tue, Jul 22, 2008 at 9:48 AM, Rahul S. Johari < [EMAIL PROTECTED]> wrote: > > Here's what it is: > > I have a php page, "a.php", which contains these three things: > > - SELECT statement to display records from a mySQL Table > - HTML Form for inserting data into the mySQL Table > - INSERT st

Re: [PHP] After INSERT form submit - Data doesn't refresh!

2008-07-22 Thread Bernhard Kohl
Thijs jou should read the OP's statement again .. The OP wrote: . *(The INSERT function is executed before the SELECT in the page).*

Re: [PHP] After INSERT form submit - Data doesn't refresh!

2008-07-22 Thread Thijs Lensselink
Quoting "Rahul S. Johari" <[EMAIL PROTECTED]>: Here's what it is: I have a php page, "a.php", which contains these three things: - SELECT statement to display records from a mySQL Table - HTML Form for inserting data into the mySQL Table - INSERT statement to insert that row into the mySQL

Re: [PHP] After INSERT form submit - Data doesn't refresh!

2008-07-22 Thread Rahul S. Johari
Here's what it is: I have a php page, "a.php", which contains these three things: - SELECT statement to display records from a mySQL Table - HTML Form for inserting data into the mySQL Table - INSERT statement to insert that row into the mySQL Table The HTML Form submits to the same, "a.php

Re: [PHP] After INSERT form submit - Data doesn't refresh!

2008-07-22 Thread Thiago H. Pojda
Code, please? :) On Tue, Jul 22, 2008 at 9:33 AM, Rahul S. Johari < [EMAIL PROTECTED]> wrote: > > Hmm, interesting. > In my case, $file does indeed output dynamic data. > > I did try with the modified time but it still doesn't work. I still have to > hit refresh on the browser, after submitting t

Re: [PHP] After INSERT form submit - Data doesn't refresh!

2008-07-22 Thread Rahul S. Johari
Hmm, interesting. In my case, $file does indeed output dynamic data. I did try with the modified time but it still doesn't work. I still have to hit refresh on the browser, after submitting the form, in order for the inserted record to appear. Not sure what to do - it's rather annoying. No

Re: [PHP] After INSERT form submit - Data doesn't refresh!

2008-07-22 Thread Rahul S. Johari
I tried with just the first three header() statements you gave, but it didn't work. Let me try the modification date ... which file is being referred to in $ffile? Also, I'm using Firefox, if it's of any consequence. Thanks! On Jul 22, 2008, at 7:30 AM, Bernhard Kohl wrote: I'm pretty s

Re: [PHP] After INSERT form submit - Data doesn't refresh!

2008-07-22 Thread Bernhard Kohl
I'm pretty sure this is a cache issue .. To disable caching:* header('Cache-Control: no-cache, no-store, max-age=0, must-revalidate'); header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); // Date in the past header('Pragma: no-cache'); * But if you have the modification date then use *$time = filemt