|
stuff
Fellowship Database Query
global $username1, $userpass;
function login(){
echo "
";
print ("
");
} // end function login
function logout(){
global $username1, $userpass;
$link = mysql_connect ("localhost", "ysong", "Gj89x");
//mysql_select_db("fellowship",$link);
@mysql_select_db("fellowship") or die( "Unable to select database");
$query = "select * from users2 where username='$username1' and encrpass='$userpass'";
$result=mysql_query($query);
$num=mysql_numrows($result);
if($num){
mysql_query(
"UPDATE users SET tmppass='' WHERE username='$username1';");
}
mysql_close();
}// end function logout
function verifyUser(){
global $username1, $userpass;
$link = mysql_connect ("localhost", "ysong", "Gj89x");
//mysql_select_db("fellowship",$link);
@mysql_select_db("fellowship") or die( "Unable to select database");
$query = "select * from users2 where username='$username1' and encrpass='$userpass'";
$result=mysql_query($query);
$num=mysql_numrows($result);
if($num){
mysql_query(
"UPDATE users SET tmppass='$userpass' WHERE username='$username1';");
}
mysql_close();
return $num;
}// end function verifyUser
function verifyLogin(){
global $username1, $userpass;
$link = mysql_connect ("localhost", "ysong", "Gj89x");
//mysql_select_db("fellowship",$link);
@mysql_select_db("fellowship") or die( "Unable to select database");
$query = "select * from users where username='$username1' and encrpass='$userpass'";
$result=mysql_query($query);
$num=mysql_numrows($result);
mysql_close();
if($num){
$tmppass=mysql_result($result,0,"tmppass");
return $tmppass;
}
return "";
}// end function verifyLogin
function options(){
global $username1, $userpass;
$userName = "ysong";
$passwd = "Gj89x";
$link = mysql_connect ("localhost", "$userName", "$passwd");
echo "
applicants5.xls (Use this file during testing) ";
// application2.xls (This file is generated by executing \"Write the data in table application2(MySql database) into MS excel table\") ";
//if($link && strcmp($hasIdentity, '1')==0){
if(!$link){
echo "Can not link to database, maybe server is down. ";
}
if($link){
mysql_close();
print ("
|