Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6383681
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T02:40:47+00:00 2026-05-25T02:40:47+00:00

I was wondering how I could go about turning this add entry link in

  • 0

I was wondering how I could go about turning this add entry link in to a delete entry link? Any help would be appreciated.

if (CAN_EDIT){
    echo '<i>'.$announcements[$x]['page_edit']='<a href="index.php?id='.$announcements[$x]['page_id'].'&act=edit">edit entry</a></i><br />';
if ($announcements[$x]['page_edit']>0){}
                        }

I understand about using

mysql_query DELETE FROM (table name) WHERE (item name)

I am just not sure how to implement it and make it a link.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T02:40:48+00:00Added an answer on May 25, 2026 at 2:40 am

    It’s really up to how your application handles the requests. The edit link code you posted shows that two parameters are being passed to the PHP: id and act. Both will be available within $_GET in PHP when the link is clicked.

    From that, we can infer that your code is checking $_GET['act'] to decide what to do. If it is equal to 'edit', you’ll probably fetch some data from the DB (for records where id equals $_GET['id']), then render an edit form.

    Using that same logic, you should create a link with id=N&act=delete (where N is an actual ID). Then in PHP you check if the value of $_GET['act'] is 'delete', then run the SQL query to delete the row with the ID passed.

    Also, make sure to do a little research on SQL injection — you should not use $_GET or $_POST values directly in the query, as that would make your app vulnerable to injection. Take a look at the mysql_real_escape_string function on the PHP manual.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I was wondering about the performance difference between these two scenarios and what could
I was wondering what could be the point in trying to delete committed changelists,
I was wondering how could I reload any website using javascript and set it
I was wondering how could I remove one (wrongly inserted) entry/word from the ispell
I had accidentally tried this, which compiles! So I was wondering what could this
Wondering if I could get some advice and direction on this following requirement: Need
Im wondering how i could add a success or fail message to return at
Just wondering if you could help wanting to produce an activity stream in Java,
Just wondering if someone could help me with a very simple SQL query. I
I was wondering how I could go about accessing values within an object, such

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.