Nomax5 Posted September 15, 2006 Share Posted September 15, 2006 Okaysearch.php has a form where visitors enter search argumentwhen they submit they go to list.php which reads some information from a table and shows it as a list at the end of each line I've put a radio button so they can select one to delete.so they select one and click delete - and we go to delete.php which deletes it from the tablethen what do I do? I've put a BACK button in delete.php so they can go back to list.phpbut obviously when they get back they have to manually refresh the page to see the changeif I header redirect from delete.php then the POST'd search argument is not avsailiable so I cant refresh the listI wonder if there is some sort of auto POST variable trick I could use to get back to list.php and refreshI'm sure I've gone about this the wrong way?I feel sure you guys have done this sort of thing before and you might give me some tips1 enter search2 show list of widgets3 select widget4 click delete widget5 show list of widgets (with one now missing)cheers Roy Quote Link to comment https://forums.phpfreaks.com/topic/20912-how-to-update-list-after-delete-solved/ Share on other sites More sharing options...
onlyican Posted September 15, 2006 Share Posted September 15, 2006 Make a Button to go back, which posts the data againor use the GET methodIf your using Javascript back function, then it runs from the Cache version on the users machineYou could try adding NO CACHE headers Quote Link to comment https://forums.phpfreaks.com/topic/20912-how-to-update-list-after-delete-solved/#findComment-92637 Share on other sites More sharing options...
Nomax5 Posted September 15, 2006 Author Share Posted September 15, 2006 onlyican - back button to re-post the data huh![b][size=12pt][color=blue]You're a genius![/color][/size][/b][size=8pt]Told you the problem, you told me the solution ![/size] Quote Link to comment https://forums.phpfreaks.com/topic/20912-how-to-update-list-after-delete-solved/#findComment-92642 Share on other sites More sharing options...
onlyican Posted September 15, 2006 Share Posted September 15, 2006 Sometimes you always try to overthink a problem, when the solution could be basicAnytime hombre Quote Link to comment https://forums.phpfreaks.com/topic/20912-how-to-update-list-after-delete-solved/#findComment-92651 Share on other sites More sharing options...
Nomax5 Posted September 15, 2006 Author Share Posted September 15, 2006 Hrrrm I did what you said and created a button from delete.php back to list.php with the required data in a hidden fieldand it goes back but the second time in it doesn't find the record that was being edited.The record exists on the tableI cut n pasted the form code from search.php into delete.php so I didn't get any typo's I've echo'd the inbound parameter and it's there.I'm wondering if it's a file pointer thing? I've echo'd the number of rows found and the first time in there is 1 and the second time in there are 0 is there something you have to do in mysql to reset the file pointer back to the begining of the table?if not then it's a regular type of error and I should be able to solve it. Quote Link to comment https://forums.phpfreaks.com/topic/20912-how-to-update-list-after-delete-solved/#findComment-92689 Share on other sites More sharing options...
Nomax5 Posted September 15, 2006 Author Share Posted September 15, 2006 Tiss okay, I sorted itit was subtle to say the leastthe parameter from delete.php had a bloody space infront of it! Quote Link to comment https://forums.phpfreaks.com/topic/20912-how-to-update-list-after-delete-solved/#findComment-92693 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.