Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.
Strange Error, unknown causes

 
Post new topic   Reply to topic    Smarty Forum Index -> Documentation
View previous topic :: View next topic  
Author Message
Praebul
Smarty n00b


Joined: 07 Aug 2008
Posts: 2

PostPosted: Tue Mar 03, 2009 5:31 pm    Post subject: Strange Error, unknown causes Reply with quote

I have a {section} that is drawing information from a class. This information populates a form with various input fields. Upon submitting the form, the POST array is processed by a class and the database is updated. At the end of this update function I use a header: location redirect to the same page.

When the page loads after submission, the fields revert back to the previous information. This occurs intermittently and has no obvious pattern.

Here's an example:

I set the input field for "title" to "HELLO" and submit. Page reloads and I change "title" to "HELLO!!!" and submit. The page reloads and shows "title" correctly as "HELLO!!!". I change "title" to "YAR" and submit. The page reloads and shows "title" as "HELLO!!!".

I have smarty caching disabled, tried force_compile, clear all cache, clear all template files, ...

If I place "sleep(3)" before the header: location redirect, it seems to work. If I submit the form on one tab and switch to another tab and refresh, the correct info appears.

It seems as though if I make a change in under a second or two then the page will remember the previous field values.
Back to top
View user's profile Send private message
mohrt
Administrator


Joined: 16 Apr 2003
Posts: 7299
Location: Lincoln Nebraska, USA

PostPosted: Tue Mar 03, 2009 7:24 pm    Post subject: Reply with quote

Are you sure it's not your browser doing some auto form-filling for you?
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Smarty Forum Index -> Documentation All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP