Heya guys. I am truly puzzled by mysql_real_escape_string.
From what I understand you need to make a database connection before the function will work. I think that I'm doing this.
$link = mysqli_connect( $sql_server, $sql_user , $sql_password ) or die ('Unable to connect to server.'. mysqli_error());
mysqli_select_db( $link, $sql_database ) or die ('Unable to select database.'. mysqli_error());
$username = mysql_real_escape_string($username, $link);
$password = mysql_real_escape_string($password);
The $username line gives me error: Warning: mysql_real_escape_string() expects parameter 2 to be resource...
The $password line gives me another error. Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: Access denied for user 'ODBC'@'localhost' (using password: NO) in...
I would think one of these would work, suggestions??
Do you have to specify the link in most of the mysqli_ functions? My thinking is that MySQLi has the link parameter first because that is essential for MySQLi to work correctly. In the mysql_ functions it didn't matter too much if you didn't specify the link because if only one connection was open, then that was obviously the default.
My question, why is the link parameter essential for MySQLi?
The man who comes back through the Door in the Wall will never be quite the same as the man who went out.