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 782521
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T20:23:55+00:00 2026-05-14T20:23:55+00:00

I want to allow users as well as me(the admin) to delete data in

  • 0

I want to allow users as well as me(the admin) to delete data in mysql.
I used to have remove.php that would get $_GETs from whatever that needed to be deleted such as… remove.php?action=post&posting_id=2. But I learned that anyone can simply abuse it and delete all my data.

So what’s the safest way for users and me to delete information without getting all crazy and hard? I am only a beginner 🙂
I’m not sure if I can use POSTs because there is no forms and the data isn’t changing.
Is sessions good? Or would there be too many with postings, user information, comments, etc.

Ex: James wants to delete one of his postings(it is posting_id=5). So he clicks the remove link and that takes him to remove.php?action=post&posting_id=5.

EDIT: Alright, so now I am a little confused. While I can’t be 100% secure, how do I do this with $_POSTs?
SOO I should use GETs to get all the data to remove.php, THEN have a confirmation submit button and when users click on it, it put all the data into POSTs and delete from the dbc?

  • 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-14T20:23:55+00:00Added an answer on May 14, 2026 at 8:23 pm

    I’ll echo gurun8 in preferring to ‘mark’ records as deleted, instead of actually removing data. And then obviously, you’ll need to check that the authenticated user has permission to delete the post.

    However, it seems very important to mention that $_GET is not safe even with authentication because of cross-site request forgery.

    Imagine if Amazon adding things to your cart based on a GET request. All I’d have to do is put an image on my page with that URL, and everyone who visited that page and logged into Amazon will have products added automatically.

    To match your example, I don’t like Jame’s post, so i put an image on my site like this:

    <img src='http://example.com/remove.php?action=post&posting_id=5'>
    

    And I send him a link to my page, and ask him to check it out, hoping that at the time he’s logged in to your site. Because, of course, he clicked that little ‘keep me logged in’ button.

    So you are right to be concerned about using GET. If you don’t want to litter pages with forms, then confirm the action by POST.

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

Sidebar

Related Questions

I'm searching a software (web-based, php/mysql) that allows users to (anonymously/with registering) write suggestions
I want to allow my users to opt-out of certain email notifications. I'm trying
Alright so I want my users to be able to click a link that
I am trying to build a domain model that will allow me to manage
I want to create a timesheet application where I need an application that will
Been reading the tutorial How to handle a Many-to-Many relationship with PHP and MySQL
More of a warning than a question: We resolved a very puzzling bug this
I discovered Tapestry 5, quite recently, its clear separation between view and controller, the
While I'm trying to detach a database through Enterprise Manager, it shows the no.
We're hosting our Ruby on Rails application with the EngineYard App Cloud, which has

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.