0

I am using this code for registering a data in mysql data base, my question is that is my password secure and SQL injection free? i defined username and password in same way in the login page! and in phpmyadmin password is encrypted and for login everything works good!

include "config.php";
$username = $_POST['username'];
$password = $_POST['password'];
$email = $_POST['email'];
Fname = $_POST['fname'];

$username = stripslashes($username);
$password = stripslashes($password);
$email = stripslashes($email);
$Fname = stripslashes($Fname);

$username = mysqli_real_escape_string($con,$username);
$password = mysqli_real_escape_string($con,hash("sha512",$password));
$email = mysqli_real_escape_string($con,$email);
$Fname = mysqli_real_escape_string($con,$Fname);
Imran Aslam
  • 208
  • 2
  • 15
  • [The Great Escapism (Or: What You Need To Know To Work With Text Within Text)](http://kunststube.net/escapism/) – deceze Aug 09 '14 at 09:52
  • This is not enough code to really tell you anything. Read the duplicate and the above link. If you need a code review, try http://codereview.stackexchange.com. – deceze Aug 09 '14 at 09:53

0 Answers0