| |||
|
Hi! I try to put passwork on my web page. but i think host(couse of security ) dont let me do that. i down load scr for pass on admin page here it is <?php include("blocks/bd.php"); if (!isset($_SERVER['PHP_AUTH_USER'])) { Header ("WWW-Authenticate: Basic realm=\"Admin Page\""); Header ("HTTP/1.0 401 Unauthorized"); exit(); } else { if (!get_magic_quotes_gpc()) { $_SERVER['PHP_AUTH_USER'] = mysql_escape_string($_SERVER['PHP_AUTH_USER']); $_SERVER['PHP_AUTH_PW'] = mysql_escape_string($_SERVER['PHP_AUTH_PW']); } $query = "SELECT pass FROM userlist WHERE user='".$_SERVER['PHP_AUTH_USER']."'"; $lst = @mysql_query($query); if (!$lst) { Header ("WWW-Authenticate: Basic realm=\"Admin Page\""); Header ("HTTP/1.0 401 Unauthorized"); exit(); } if (mysql_num_rows($lst) == 0) { Header ("WWW-Authenticate: Basic realm=\"Admin Page\""); Header ("HTTP/1.0 401 Unauthorized"); exit(); } $pass = @mysql_fetch_array($lst); if ($_SERVER['PHP_AUTH_PW']!= $pass['pass']) { Header ("WWW-Authenticate: Basic realm=\"Admin Page\""); Header ("HTTP/1.0 401 Unauthorized"); exit(); } } ?> its working correct on my local host .... but on black magic its working too, but the password witch one is on userlist (in my date basse) do not match... what i`m have to change? |
| |||
|
This looks like it's a coding issue, which is not something we would provide support for. I'd recommend posting on a coding forum for assistance. You could try over here: Webmaster Help - Coding Help at IrishWebmasterForum.com
__________________ Please do not send me PMs for support issues - thanks for your understanding. Blacknight Blog | VPS Hosting| Blacknight Technical Status Blog | Speed Test|Webmaster Chat |Personal Blog |