Q:

PHP/MySQL Insert into Database not working

I tried everything I could to fix the link of code but everything I tried gave me a white screen I know that this line of code is the only code is the only one that has a syntax error and the rest of the code is 100% fine. I am trying to insert name, email, password from a Form using $_POST and with md5 hashing for the password.
$link = connect to mySQL Database
$query="INSERT INTO 'users' ('name', 'email', 'password')
VALUES(
'".mysqli_real_escape_string($link, $_POST['name'])"',
'".mysqli_real_escape_string($link, $_POST['email'])."',
 '".md5(md5($_POST['email']).$_POST['password'])."')";

A:

Why don't you make it simple instead? Something like:
$name  =   mysqli_real_escape_string($link, $_POST['name']);
$mail  =   mysqli_real_escape_string($link, $_POST['email']);
$pass  =   md5(md5($_POST['email']).$_POST['password']);

$query="INSERT INTO `users` (`name`, `email`, `password`) VALUES('$name','$mail', '$pass')";

