Refresh Form to Display changes

Reply

Join Date: Jan 2005
Posts: 20
Reputation: scoobie is an unknown quantity at this point 
Solved Threads: 0
scoobie scoobie is offline Offline
Newbie Poster

Refresh Form to Display changes

 
0
  #1
Jan 16th, 2005
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
Reply With Quote Quick reply to this message  
Join Date: Oct 2004
Posts: 348
Reputation: paradox814 is an unknown quantity at this point 
Solved Threads: 4
paradox814's Avatar
paradox814 paradox814 is offline Offline
Posting Whiz

Re: Refresh Form to Display changes

 
0
  #2
Jan 17th, 2005
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)
Reply With Quote Quick reply to this message  
Join Date: Jan 2005
Posts: 20
Reputation: scoobie is an unknown quantity at this point 
Solved Threads: 0
scoobie scoobie is offline Offline
Newbie Poster

Re: Refresh Form to Display changes

 
0
  #3
Jan 17th, 2005
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
Reply With Quote Quick reply to this message  
Join Date: Jan 2005
Posts: 294
Reputation: zippee is an unknown quantity at this point 
Solved Threads: 6
zippee's Avatar
zippee zippee is offline Offline
Posting Whiz in Training

Re: Refresh Form to Display changes

 
0
  #4
Jan 19th, 2005
I think you've placed you script in the wrong order. You have to place the 'update' before the form being display. For example:
[php]
if ($_POST("action")=="true")
{
// do something to update your table
// use subroutine
}
else
{
// do something to display your form
// use subroutine
}[/php]
Reply With Quote Quick reply to this message  
Join Date: Nov 2003
Posts: 360
Reputation: Gary King will become famous soon enough Gary King will become famous soon enough 
Solved Threads: 5
Team Colleague
Gary King's Avatar
Gary King Gary King is offline Offline
PHP/vBulletin Guru

Re: Refresh Form to Display changes

 
0
  #5
Jan 25th, 2005
Yep, and then the update will take place before the new data is outputted.
Reply With Quote Quick reply to this message  
Join Date: Jan 2005
Posts: 20
Reputation: scoobie is an unknown quantity at this point 
Solved Threads: 0
scoobie scoobie is offline Offline
Newbie Poster

Re: Refresh Form to Display changes

 
0
  #6
Jan 26th, 2005
no i want to display the data on file first then allow them enter changes and redisplay the form with updated data.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



Tag cloud for MySQL
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC