Jump to content


Photo

show record in comrimdelete.php


  • Please log in to reply
5 replies to this topic

#1 Ann92

Ann92
  • New Members
  • Pip
  • Newbie
  • 4 posts

Posted 15 April 2004 - 06:58 PM

Hi, I need help to figure out the confirmdelete.php not show record wants to delete. Suppose the record should be deleted whenever user clicks the delete button in the confirmdelete.php. However, I got delete record when link to the confirmdelete page without click the delete button. So, no record shows in the confirmdelete.php form. I followed the editing database records sample at www.macromedia.com/support/dreamweaver/building/users_delete_rcrds_php/

Thanks for any help!



#2 homchz

homchz
  • Members
  • PipPipPip
  • Advanced Member
  • 93 posts
  • LocationLee, New Hampshire

Posted 16 April 2004 - 01:51 AM

This one was very hard for me to get as well but I use a confirmation page the part I missed was passing the info through a hidden field to the delete page, and the fact the delete page was actually just blank page to run the delete script got me for a while too. In ecence you will need three pages to create this

Page to enter record to delete w/ a hidden field to pass to the
Page running the delete script that redirects to
Page you choose to redirect to.


I hope this helps some, but if you need more help I can try, I am not the best at explaining how to acheve things on the web.


Good luck

Josh

#3 Ann92

Ann92
  • New Members
  • Pip
  • Newbie
  • 4 posts

Posted 16 April 2004 - 12:58 PM

Progress here!

Now, I have the first page shows the record needs to be delete and cinfirm deletion button, remove delete record behvior here and save as confirmdelete.php. It works fine. But how to make link to the second page via button? I have the second page as DeleteOk it contains delete record behavior. I put OK button on the form.again, I try to link to detail list page via OK button.

Thanks for any help

#4 homchz

homchz
  • Members
  • PipPipPip
  • Advanced Member
  • 93 posts
  • LocationLee, New Hampshire

Posted 16 April 2004 - 02:01 PM

it still has to be done through a form with a hidden field containing the info to find and delete (I use Email addresses so people can unsubscribe from my mailing list) in the form to pass to the delete page. Then you link the form to the delete page. he delete page runs the script, and redirects to the page you tell it to when setting it up.

#5 Ann92

Ann92
  • New Members
  • Pip
  • Newbie
  • 4 posts

Posted 16 April 2004 - 08:02 PM

I used the parameters pass the specific record to the confirmdelete page shows the record to be deleted. Do I have to use hidden field to link? I'd like to show keyfield in the form. I need to find a way let it goes delete page whenever user click confirm button in the confirmdelete page. did I missing something here?

Thanks

#6 homchz

homchz
  • Members
  • PipPipPip
  • Advanced Member
  • 93 posts
  • LocationLee, New Hampshire

Posted 16 April 2004 - 08:44 PM

I don't use the hidden field until the confirm page.

User enters there email address and hits submit
Next page show Email address and name from a record set based on the search from previous page. I put all the information on this page in a form, as well as a hidden field with the email address in it.

When they hit the delete button it goes to the "delete" page that runs the scrip and deletes the row based on the Email address provided, then redirect to a basic thank you page.

That is how I have done it. But I might not be explaining it right.

Record set to display what to delete,
Hidden field on diplay page to pass to delete page
Delete page runs script and redirects when done.


Josh






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users