Jump to content

hide URL

- - - - -

  • Please log in to reply
3 replies to this topic

#1
VakhoQ

VakhoQ

    Programmer

  • Members
  • PipPipPipPip
  • 127 posts
hello, how are you?


for example I have created web page and I have URL: www.site.com/articles.php?id=2

Now I want to hide "articles.php?id=2" I thnk, this will be good way to safe web page from SQL injections. what do you think?
GNU/Linux Is the Best.

#2
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
  • Location:Upstate, South Carolina
  • Programming Language:C, C++, PL/SQL, Delphi/Object Pascal, Pascal, Transact-SQL, Others
  • Learning:Java, C#, PHP, JavaScript, Lisp, Fortran, Haskell, Others
That will not protect you from SQL injections at all. You probably want to use POST instead of GET for your form method, but preventing SQL injections means validating the data on the server BEFORE you try to use it.
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#3
Alexander

Alexander

    It's Science!

  • Moderators
  • 4,124 posts
  • Location:Vancouver, Eh! Cleverness: 200
Obfuscation (url rewriting, etc.) will never be a valid security solution.
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.

#4
RHochstenbach

RHochstenbach

    Learning Programmer

  • Members
  • PipPipPip
  • 56 posts
What you could do is change the way you retreive the information from the URL. If you have something like this:

$id = $_GET['id'];


Change it to this:

$id = mysql_real_escape_string($_GET['id']);






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users