Jump to content

values inserted are not reflected immediately


sid0972

Recommended Posts

hey

 

i have a page to edit details, and when i save the details in database the results are not reflected immediately, only when i log out and login again, the new details are shown.

What could be the reason??

 

if it is required to post the snippet of code, please do tell.

Link to comment
Share on other sites

i have created a login system using php and mysql, and it has an option to store and edit some details.

 

when i edit and save the details, they get saved in the database, but they are not shown on the web page during that session.

When i log out and log in again, then the new details are shown.

 

i need to know why is this happening.

Link to comment
Share on other sites

probably because there is no code to show the saved details after the piece of code that saved the details... :P?

 

And the reason that they do show up when refreshing the page, is because the piece of code to show the detail is executed before the details are saved.

Edited by stijn0713
Link to comment
Share on other sites

You are correct at one point, when details are saved i always clicked 'back', as i didnt put any 'link' there to go back.

 

But it still does not explain that why, after coming back to the display page, details are not being displayed even after hitting refresh, as you said, but only after the current session is destroyed and new one starts.

 

EDIT: when i log in, details are displayed correctly, no problem, but then if i click on some other link ( i have several ) and if i come back to display page, details are gone......

only show up when i log out and log in again.

 

Does it have to do something with sessions??

Edited by sid0972
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.