Jump to content

Delete associated rows in other tables


Guest

Recommended Posts

Hi there,

 

I have created a deletion link on my CMS so that when a user wants to delete a profile, he can just click on that link to delete it. I have 2 issues though:

 

- First, I included an onclick feature that should warn the user that he is about to delete a profile and ask him if he is sure about that. Here is the code:

<a href="delete_actor.php?actor=<?php echo urlencode($sel_actor['id']) . "&currentpage=" . $currentpage ; ?>" onclick="return confirm('Are you sure you want to DELETE this actor's page?');">Delete <?php echo $sel_actor['first_name']?>'s page</a>

 

The thing is, when a user clicks on that link, it deletes the page but there is no warning about deleting it.

 

- Second issue, there is a table linked to the profile table, listing all the credits for each actor. How could I delete the credits for the actor I want to delete, so that the table containing all the credits does not contain information that are not relevant?

 

Thanks in advance for your help.

 

Cheers,

 

Krys

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.