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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T21:10:29+00:00 2026-06-07T21:10:29+00:00

I’m fairly new to server side coding and am currently setting up a site

  • 0

I’m fairly new to server side coding and am currently setting up a site which involves pulling objects from a database, allowing a user to edit them, and then re-inserting these elements in to the database.

However, I’m not sure how to prevent the user from ruining the database through the use of development tools.

Essentially elements are displayed in a list and each element is a script. It has it’s own unique ID and a name (not necessarily unique). So, when it is pulled from the database, the name is the list’s text and the id is contained within an attribute field. When they’re edit, I pull the id from the html attribute and use that to save any changes to the database.

Of course, I make checks server side to determine if all of edits the user made are allowed.

But, the problem I’m running into is that the user could easily open up any form of developer tools, change scripts Id’s (switch them or vary them in any way they please) and this would definitely hurt the database.

Could someone provide me a few techniques to prevent this issue? I’d really appreciate it. Thanks!

I don’t know how it’ll help, but the majority of my code is in Javascript (using jquery and jquery ui) and php (using CodeIgniter as the framework).

EDIT:

Imagine two elements

Id -> Title -> Description

5 -> Hello -> World

6 -> Bye -> Sleep

On server side, these are displayed as lists and there’s an alternate way to edit the values.

<li data-id=5>Hello</li>
<li data-id=6>Bye</li>

Someone can load up fire bug and change the data-id’s that I use for queries, say make the first one 7. Or swap both. In this case, that doesn’t really matter, but it’s actually more for my curiosity, is there any way to prevent this?

  • 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-06-07T21:10:32+00:00Added an answer on June 7, 2026 at 9:10 pm

    Use mysql_real_escape_string to send a safe query to the database:

        $user_input = mysql_real_escape_string($_POST['user_input']);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want use html5's new tag to play a wav file (currently only supported
I have a text area in my form which accepts all possible characters from
I am currently running into a problem where an element is coming back from
I have a view passing on information from a database: def serve_article(request, id): served_article
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
I am trying to understand how to use SyndicationItem to display feed which is
I used javascript for loading a picture on my website depending on which small
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have a French site that I want to parse, but am running into

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.