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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T09:32:50+00:00 2026-06-17T09:32:50+00:00

So I’ve been wondering for some time, after being advised in a previous question

  • 0

So I’ve been wondering for some time, after being advised in a previous question to use PDO prepared statements, why its important when connecting to my Database to use them in an instance like so?

eg using $_SERVER['REMOTE_ADDR']

I mean, if no one knows I’m using a database, and they have no idea what I’m looking for, and the thing I’m looking for in the database (assuming they know) is an IP address, why should it matter? Is this a matter of XSS attacks?

Genuine question. Never been able to find any reason to use PDO statements (or similar methods) in this instance. Surely I’m not vunerable?

  • 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-17T09:32:51+00:00Added an answer on June 17, 2026 at 9:32 am

    So you’re not sanitising your input at all?? Really?

    What happens when you have a user named “Bob O’Reilly”? Will your code cope with that? Have you tried it?

    Or what happens if someone enters a letter into a numeric field. Will your code cope with that?

    SQL data sanitation is about more than just protecting against hacks; it’s allows for everyday data to be entered without worrying about whether it contains quote marks or other characters that would break the query.

    Protecting against hacks is a very good thing, but even if that wasn’t a consideration, you would still need to sanitise your DB input.

    …if no one knows I’m using a database…

    Hackers don’t “know”, they guess; they try out a few common hacking techniques to see what happens. If the site responds in the way they hope for then they know that its vulnerable. That’s when they really start attacking you.

    Those investigation hacks are typically automated and just trawl the web looking for sites to attack; you’ll be vulnerable simply by being online. Don’t think you’re safe just because you’re obscure, or because no-one knows your code, or because no-one would want to hack you. They will find you and they will hack you.

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

Sidebar

Related Questions

For some reason, after submitting a string like this Jack’s Spindle from a text
I have a jquery bug and I've been looking for hours now, I can't
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I am trying to understand how to use SyndicationItem to display feed which is
I am confused How to use looping for Json response Array in another Array.
I want use html5's new tag to play a wav file (currently only supported
This could be a duplicate question, but I have no idea what search terms
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I'm trying to select an H1 element which is the second-child in its group

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.