how to stop mysql injector on registration page

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    how to stop mysql injector on registration page

    how to do it plz help

    Added after 3 minutes:

    i get hack person putting a code in wen registration and wen the enter there is owner
    Last edited by berty14; 29.12.10, 16:50.

    #2
    use mysql_real_escape_string() function
    Last edited by ksg91; 30.12.10, 17:27.
    Follow me @ksg91 | My Blog: http://ksg91.com | Nokia Blog: http://NokiaTips.in

    Comment


      #3
      wat u mean mysql_real_string_escape() function and where I have to put it

      Comment


        #4
        you can use also ereg_replace() function like

        $str=ereg_replace("[^a-zA-Z0-9_ -]", "", $_REQUEST['query']);

        Comment


          #5
          before passing any variable from form into sql query, pass it from that function.
          eg
          PHP Code:
          $xyz=mysql_real_escape_string($_POST['xyz']); 
          Follow me @ksg91 | My Blog: http://ksg91.com | Nokia Blog: http://NokiaTips.in

          Comment

          Working...
          X