Hi,
I've got something like this, is that the same as what you've got?
$userid = $_POST['login'];
$passWord = $_POST['password'];
require("databaseInfo.php");
$dbtable = "users";
$link=mysql_connect("localhost", $username, $password) or die("Cannot connect to database");
//select database
@mysql_select_db($database) or die("Unable to select database");
if(get_magic_quotes_gpc()) {
$userid = stripslashes($userid);
$passWord = stripslashes($passWord);
}
$query = sprintf("SELECT * FROM %s WHERE user_id = '%s'", $dbtable, mysql_real_escape_string($userid, $link));
$result=mysql_query($query, $link) or die("Unable to load selected table");
I think I copied the code from somewhere so not really sure what the magic_quotes_gpc do.. Do I still need your code to replace " ` " with " ' "?
Thanks!