dannyone Posted March 26, 2009 Share Posted March 26, 2009 i have created a dynamic dropdown from my mysql database, and the value selected is posted to a new page, as follows $room = $_POST['room']; now i can use that value on the other page to collect more information from my database. however i now need to post that value again, this time into my database using an update query, but when i press submit it looses the value and looses all the information linked to it on the page. is there a way of reposting the value? or another way round this? im seriously confused can any1 help? Thanks Link to comment https://forums.phpfreaks.com/topic/151282-solved-repost-posted-value/ Share on other sites More sharing options...
Maq Posted March 26, 2009 Share Posted March 26, 2009 You can put it into a hidden field to "repost" it to the next page. EDIT: You can also store it in a session or in the URL and retrieve it with the GET method. Link to comment https://forums.phpfreaks.com/topic/151282-solved-repost-posted-value/#findComment-794682 Share on other sites More sharing options...
dannyone Posted March 26, 2009 Author Share Posted March 26, 2009 thanks maq, i saved it in a session and it worked an absolute treat!! Link to comment https://forums.phpfreaks.com/topic/151282-solved-repost-posted-value/#findComment-794717 Share on other sites More sharing options...
Maq Posted March 26, 2009 Share Posted March 26, 2009 thanks maq, i saved it in a session and it worked an absolute treat!! That's probably a better idea in case you need it on other pages, then you won't have to keep submitting it. Link to comment https://forums.phpfreaks.com/topic/151282-solved-repost-posted-value/#findComment-794724 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.