Re: Slashes or no slashes

From: Date: Tue, 24 Aug 2010 03:35:13 +0000
Subject: Re: Slashes or no slashes
References: 1 2 3 4 5 6 7 8 9 10 11  Groups: php.db 
Request: Send a blank email to php-db+get-47325@lists.php.net to get a copy of this message
Just to make sure, cause I am ready to get past this. Is this correct? function confirmUP($username, $password){ /* Verify that user is in database */ $q = "SELECT password FROM ".TBL_USERS." WHERE username = '".mysql_real_escape_string($username)."'";
Perfect.
/* Retrieve password from result */ $dbarray = mysql_fetch_array($result); $dbarray['password'] = htmlspecialchars($dbarray['password']); //Or is this where I need to leave htmlspecialchars off too?
Leave it off. You're not displaying $dbarray['password'] here - so you don't need to use htmlspecialchars. -- Postgresql & php tutorials http://www.designmagick.com/

« previous php.db (#47325) next »