mysqli - Can anyone or hacker delete my database table/row/column without knowing my database username and password in php-mysql? -


this question has answer here:

i want know how protect website hacker. php-mysql developer. fetching data database use mysqli. prevent website sql injection use $db->real_esacpe_string() function of php. prevent website xss(cross site scripting) used function

function parsing($text) { global $db;         $text=$db->real_escape_string($text);  $text= @trim($text);        $text= strip_tags($text);  if(get_magic_quotes_gpc()) {             $text= stripslashes($text);         }     $text=str_replace('<','',$text);     $text=str_replace('>','',$text);           $text=htmlspecialchars($text, ent_quotes, 'utf-8');     return($text); } $name=parsing($_post['name']); 

any suggestion side welcomed. in advance.

with of done don't think hacker can delete or access database.

but there many other techniques hacker can use in hacking website.

like

  1. ddos
  2. xss
  3. session hyjacking etc

which there different ways of protecting website against them.


Comments

Popular posts from this blog

python - Selenium remoteWebDriver (& SauceLabs) Firefox moseMoveTo action exception -

html - How to custom Bootstrap grid height? -

transpose - Maple isnt executing function but prints function term -