$value) { $$key = $value; } } $a=$_REQUEST["a"]; //echo $a; exit; ?>
".$errMsg.""; } break; case "displayLogin": if(!isset($userId)) { include_once("verify_account.php"); } break; case "displayForm": userFormRegister(); break; case "forgotP": forgotPwd(); break; case "Go": sendForgotPwd(); break; default : echo "$errMsg"; } ?>
"; $rop=OCIParse($conn,$ss); OCIExecute($rop); OCIFetchInto($rop,$mor,OCI_ASSOC); $ss1="select count(*) as COUNT from CSS_APP_GENERAL where CSS_APPLICANT_ID=$mor[NEXTVALUE]"; //echo $ss1."
";exit; $rss1=OCIParse($conn,$ss1); OCIExecute($rss1); OCIFetchInto($rss1,$arss1,OCI_ASSOC); $ss2="select count(*) from GR_APPLICANT_DETAIL where GR_APPLICANT_ID=$mor[NEXTVALUE]"; //echo $ss2."
"; $rss2=OCIParse($conn,$ss2); OCIExecute($rss2); OCIFetchInto($rss2,$arss2,OCI_ASSOC); if($arss1['COUNT']==0 && $arss2['COUNT']==0) { $nextval=$mor[NEXTVALUE]; $thisis=1; } else { $loop++; } }*/ $query = "insert into GR_LOGIN_INFORMATION ( GR_APPLICANT_ID , GR_LOGIN_ID , GR_PASSWORD , GR_EMAIL , GR_FIRST_NAME , GR_LAST_NAME , STATUS , GR_CNIC_NO ) values(SQ_GR_LOGIN_INFORMATION.nextval,'$login_Name','$pwd','$uemail','$first_name','$last_name',1,'$cnic_no')"; //echo $query; exit; $stmt = OCIParse($conn, $query); if (OCIExecute($stmt)) { $text = "
Congratulations! Account has been created
Password : $pwd
Your Login ID : $login_Name

Thank you for membership.
 



 

"; /* $headers = "From: http://www.fpsc.gov.pk \n"; $headers .= "X-Mailer: PHP\n"; $headers .= "Content-Type: text/html; charset=iso-8859-1\n"; $subject = "FPSC MemberShip"; @$email = $uemail; @$response = mail(@$email, $subject, $text, $headers); if (@$response) { echo " "; } else { echo "error while sending email"; } */ ?>

:: Registration Information
First Name  *  
Last Name  *  
Login Name  *  
Password  *   Minimum 6 characters
Confirm Password  *  
Email Address  *  
Computerized NIC No  *   e.g. 12345-1234567-1
 
   
 

:: Forgot Password
 
 Email:
 
Sorry Your request cannot be processed due to following reasons:-
"; $role_sql = "select count(*) as CNT from GR_LOGIN_INFORMATION where GR_LOGIN_ID = '$login_Name'"; // echo $role_sql; //exit; $rs1 = OCIParse($conn, $role_sql); OCIExecute($rs1); OCIFetchInto($rs1, $row1, OCI_ASSOC); $nic_sql = "select count(*) as nicCNT from GR_LOGIN_INFORMATION where GR_CNIC_NO = '$cnic_no'"; // echo $role_sql; //exit; $rs11 = OCIParse($conn, $nic_sql); OCIExecute($rs11); OCIFetchInto($rs11, $row11, OCI_ASSOC); //echo "CNT ".$row1['CNT']." CNIC ".$row11['NICCNT']." ".$cnic_no; //exit; if($row1["CNT"] > 0) { $errMsg ="$errorHead Login \"$login_Name\" already exists in our database, please choose different login

"; $return = 0; }else{ if($row11["NICCNT"] > 0) { $errMsg ="$errorHead The CNIC \"$cnic_no\" already exists in our database, please choose Correct CNIC Number

"; $return = 0; }else $return = 1; } /* $role_sql ="select count(GR_LOGIN_ID) as CNT from GR_LOGIN_INFORMATION where GR_EMAIL = '$uemail'"; $rs1 = OCIParse($conn, $role_sql); OCIExecute($rs1); OCIFetchInto($rs1, $row1, OCI_ASSOC); if($row1["CNT"] > 0) { $errMsg ="$errorHead Email address already exists in our database, Please choose forgot

"; $return = 0; }else{ $return = 1; }*/ return $return; } function sendPasswordForm() { global $errMsg,$login_Name,$pwd,$uemail,$conn,$first_name,$last_name; $errMsg = ""; if (strlen($errMsg) == 0) { $errorHead = "
Error
Your request couldnot be processed due to following reasons,
"; $role_sql = "select count(*) as CNT from GR_LOGIN_INFORMATION where GR_LOGIN_ID = strtoupper('$login_Name')"; //echo $role_sql; //exit; $rs1 = OCIParse($conn, $role_sql); OCIExecute($rs1); OCIFetchInto($rs1, $row1, OCI_ASSOC); if($row1["CNT"] > 0) { $errMsg ="$errorHead Login already exists in our database, please choose different login

"; OCIFreeStatement($rs1); $return = 0; }else { $return = 1; $sql1 = "select count(GR_LOGIN_ID) as count from GR_LOGIN_INFORMATION where GR_EMAIL = '$email'"; $rs1 = OCIParse($conn, $sql1); OCIExecute($rs1); OCIFetchInto($rs1, $row1, OCI_ASSOC); if ($row1["count"] > 0) { $errMsg = "$errorHead Email address already exists in our database, Please choose forgot your password to recover your login

Forgot Your Password"; $return = 0; } else { $return = 1; } } } else { $errMsg = "$errorHead "; $return = 0; } return $return; } function sendForgotPwd(){ global $errMsg,$login_Name,$pwd,$uemail,$conn; $text=""; $role_sql = "select * from GR_LOGIN_INFORMATION where GR_EMAIL = '$uemail'"; //echo $role_sql; //exit; $rs1 = OCIParse($conn, $role_sql); OCIExecute($rs1); OCIFetchInto($rs1, $row1, OCI_ASSOC); if(OCIRowCount($rs1) > 0) { $login_Name =$row1["GR_LOGIN_ID"]; $pwd =$row1["GR_PASSWORD"]; /*$text.="
";*/ $text.="
Congratulations! Account has been created
Your Login ID : $login_Name
Password : $pwd

Thank you for membership.
 



 

"; //echo $text; $headers = "From: http://www.fpsc.gov.pk \n"; $headers .= "X-Mailer: PHP\n"; $headers .= "Content-Type: text/html; charset=iso-8859-1\n"; $subject = "FPSC Forgot Password"; @$email = $uemail; @$response = mail(@$email, $subject, $text, $headers); if (@$response) { echo "
Your Passowrd has been sent
"; } else { echo "error while sending email"; } OCIFreeStatement($rs1); }else{ echo "Email Address does not exist"; } } ?>