mysql_escape_string(): This function is deprecated; use mysql_real_escape_string() instead.
However if you use PHP 7 both of these wont work as mysql driver is ded
Did real not work? what was the errorphp 5, how fix it? I tested use mysql real escape
Did real not work? what was the error
Your database connection is wrong
Why not use mysqli? PHP mysqli_real_escape_string() Function
Okey so mysql_real_escape_string expects your mysql connection as the second parammetter, try doing that
However it loads the last connection open if its null so it should work. Are you sure your database connection is ok?
The link I posted shows exactly what you need.
Your database connection is wrong as raggaer said and you are still using the old function.
This has already been solved, but thank youFirst of all, create a user for your server in your database. Don't just use root.
1. open MySQL CLI
2. create user 'forgottenserver'@'localhost' identified by 'passw0rd';
3. grant all privileges on forgottenserver.* to 'forgottenserver'@'localhost';
4. flush privileges;
Then try again but using the user you just created.
Typed from head so look up if the syntax checks out.
Second, use PDO.