<?php $auth = "false"; if (isset( $PHP_AUTH_ID ) && isset( $PHP_AUTH_PW )) { mysql_connect( $checkservername, $dbcheckusername, $dbcheckpassword ) or die ( 'Unable to connect to server.' ); mysql_select_db( $dbcheckbase ) or die ( 'Unable to select database.' ); if ($encryptedpw) { $chkpw = md5($PHP_AUTH_PW); } else { $chkpw = $PHP_AUTH_PW; } $sql = "SELECT * FROM user WHERE userid = '$PHP_AUTH_ID' AND password = '$chkpw' AND (usergroupid = '2' or usergroupid = '5' or usergroupid = '6' or usergroupid = '7')"; $result = mysql_query( $sql ) or die ( 'Unable to execute query.' ); $num = mysql_numrows( $result ); if ( $num != 0 ) { $auth = "true"; } } ?>
Show Your Support