Tuesday, 14 January 2014

How to protect your web site from SQL injection (string based) BY VIKAS BATTA


STEP 1 :-

        You have a c-pannel access like this


STEP 2 :-
    
               Now open the FILE MANAGER

STEP 3 :-
     
       Now select the public.html directory  

STEP 4 :-

       Here you Select the config.php file

STEP 5 :-

     Now edit the config file with 4 lines
       // To protect MySQL injection
           $myusername = stripslashes($myusername);
           $mypassword = stripslashes($mypassword);
           $myusername = mysql_real_escape_string($myusername);
           $mypassword = mysql_real_escape_string($mypassword);


STEP 6 :-
1               Now save the file
  


             Congratulation now your web site is secure from SQL attack