Jump to content

how to update list after delete ** SOLVED **


Nomax5

Recommended Posts

Okay


search.php has a form where visitors enter search argument
when 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 table

then what do I do? 
I've put a BACK button in delete.php so they can go back to list.php
but obviously when they get back they have to manually refresh the page to see the change

if I header redirect from delete.php then the POST'd search argument is not avsailiable so I cant refresh the list
I wonder if there is some sort of auto POST variable trick I could use to get back to list.php and refresh


I'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 tips

1 enter search
2 show list of widgets
3 select widget
4 click delete widget
5 show list of widgets (with one now missing)

cheers Roy

Link to comment
Share on other sites

Hrrrm I did what you said and created a button from delete.php back to list.php with the required data in a hidden field
and it goes back but the second time in it doesn't find the record that was being edited.

The record exists on the table
I 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.



Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.