0

Hi,

i am using mysql and php.

i was wondering if anyone can help me. when customers login a form with thier details which are stored in the mysql database are displayed. when they change a detail such as their address and click on the update button their details are changed in the database but the field in the form changes back to what was there before the update.

Does anyone know how to make it so that it will display their new updated details without having to log out and log back in again.

Thanks in advanced

Scoobie

4
Contributors
5
Replies
6
Views
12 Years
Discussion Span
Last Post by scoobie
0

We would need more information... try closing the session and creating a new one (or if you use cookies renew them with the new information)

0

i don't use sessions or cookies. when the user enters their username and password and click submit on the html form it calls a script that finds their details and displays them back in a form. also in the script is an update query that runs when they click the update button. if i click on the update button twice then i see the changes they made in the form but the database reverts back to the old details.

if there is anymore info that i can give please let me know.

Scoobie,

P.S.
i am very very new to PHP and MYSQL

0

I think you've placed you script in the wrong order. You have to place the 'update' before the form being display. For example:

if ($_POST("action")=="true")
{
  // do something to update your table
  // use subroutine
}
else
{
  // do something to display your form
  // use subroutine
}
0

no i want to display the data on file first then allow them enter changes and redisplay the form with updated data.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.