Thank you guys for the wonderful job you are doing. I just uploaded my website on the the remote server and it brought me back this error message.
Warning: mysq
The problem is you use mysql_real_escape_string()
function first then you connect:
$username = mysql_real_escape_string($_POST['username']);
$password = mysql_real_escape_string($_POST['password']);
mysql_connect("50.28.8.6", "root","") or die(mysql_error()); //Connect to server
Solution is to connect first then use function mysql_real_escape_string()
//Connect to server
mysql_connect("50.28.8.6", "root","") or die(mysql_error());
$username = mysql_real_escape_string($_POST['username']);
$password = mysql_real_escape_string($_POST['password']);
This is because mysql_real_escape_string()
requires the connection.