943,965 Members | Top Members by Rank

Ad:
  • MySQL Discussion Thread
  • Unsolved
  • Views: 15915
  • MySQL RSS
Jan 16th, 2005
0

Refresh Form to Display changes

Expand Post »
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
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
scoobie is offline Offline
20 posts
since Jan 2005
Jan 17th, 2005
0

Re: Refresh Form to Display changes

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)
Reputation Points: 13
Solved Threads: 4
Posting Whiz
paradox814 is offline Offline
351 posts
since Oct 2004
Jan 17th, 2005
0

Re: Refresh Form to Display changes

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
Reputation Points: 10
Solved Threads: 0
Newbie Poster
scoobie is offline Offline
20 posts
since Jan 2005
Jan 19th, 2005
0

Re: Refresh Form to Display changes

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]
Reputation Points: 10
Solved Threads: 7
Posting Whiz in Training
zippee is offline Offline
294 posts
since Jan 2005
Jan 25th, 2005
0

Re: Refresh Form to Display changes

Yep, and then the update will take place before the new data is outputted.
Team Colleague
Reputation Points: 53
Solved Threads: 5
PHP/vBulletin Guru
Gary King is offline Offline
360 posts
since Nov 2003
Jan 26th, 2005
0

Re: Refresh Form to Display changes

no i want to display the data on file first then allow them enter changes and redisplay the form with updated data.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
scoobie is offline Offline
20 posts
since Jan 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in MySQL Forum Timeline: msql data transer problems
Next Thread in MySQL Forum Timeline: displaying members from specific usergroup with vbulletin





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC