PHP: form action on same page, still show same until refresh

Posted by Karem on Stack Overflow See other posts from Stack Overflow or by Karem
Published on 2011-01-04T18:34:59Z Indexed on 2011/01/04 18:54 UTC
Read the original article Hit count: 356

Filed under:
|
|

Yes, Im having a little edit profile page, index.php?mode=profile. Lets take the username in the editprofile form as example. The username is already in the username-field. So i changed from "Peter" to "Tom" and press save.

The action is ?mode=profile&edit=true. So now when i have pressed save it has updated the column in the db from Peter to Tom. But this field keeps having the value "Peter" until if i do press refresh (or f5), then "Tom" will appear. Like it hasnt updated in the database anything, although it did but it still shows Peter until next refresh.. like it caches, but it shouldnt cache nothing?

Any help on this? Is it because its on the same "page" / file? what can i do

© Stack Overflow or respective owner

Related posts about php

Related posts about caching