Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query not refreshing the way I'd expect

Status
Not open for further replies.

skicamel

Programmer
Dec 24, 2001
126
US
I'm trying to create a page that will allow a user to change basic information...Example of table data:

Value Existing Change
----- -------- ------
Name Bob ______
Login bobrocks ______
pass jimbob ______

--Submit--

The Change fields are textboxes. The Existing fields are pulled from a query. The problem I'm having (probably a simple one), is that if you say change 'Bob' to 'Jim' and then submit, the 'Existing' name is still Bob until I refresh. I've tried adding refresh META lines in the header, and I've tried odbc_close & odbc_free_result to see if this might force a refresh of the query.

Needless to say, I'm not the most schooled in PHP. Any insight would be much appreciated. If you need examples of code or anything more to go on, let me know.

Thanks everyone.
 
Do you update the value before you fetch it again from the database? If not, that is the way it should work. To change it, just put the update before you fetch the data again. //Daniel
 
Just bad logic on my part. I had the query as the first thing in the page, the updates were down below. My early morning mind was thinking the updates would run from the original load of the page when I hit submit, not reopen the page, pull the query, then hit the updates at the end.

I should be punished for my lack. I almost hesitate responding in hopes that this post will fall further down the list into obscurity, thus hiding my human imperfection.
:)

Thanks, Daniel.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top