Exemple #1
0
<?php

include_once 'dbFunction.php';
$funObj = new dbFunction();
if ($_GET['qu'] && $_GET['su']) {
    $userid = $_GET['qu'];
    $password = $_GET['su'];
    $user = $funObj->Login($userid, $password);
    if ($user) {
        if ($_SESSION['randm'] == $_GET['ru']) {
            $_SESSION['user'] = $userid;
            //echo "log";
            $x = $_SESSION['randm'];
            header("location:skill.php");
        } else {
            //echo "capatcha";
            //echo '<br/>';
            //$_SESSION['randm']=$text;
            $x = $_SESSION['randm'];
            header("location:login1.php");
        }
    } else {
        header("location:login1.php");
        //echo"nolog";
    }
} else {
    header('location:login1.php');
}
Exemple #2
0
<?php

include_once 'dbFunction.php';
error_reporting(0);
$funObj = new dbFunction();
if ($_POST['login']) {
    $emailid = $_POST['emailid'];
    $password = $_POST['password'];
    $user = $funObj->Login($emailid, $password);
    if ($user) {
        // Registration Success
        header("location:survey.php");
    } else {
        // Registration Failed
        echo "<script>alert('Emailid / Password Not Match')</script>";
    }
}
if ($_POST['register']) {
    $username = $_POST['username'];
    $emailid = $_POST['emailid'];
    $password = $_POST['password'];
    $ngo = $_POST['ngo_name'];
    $city = $_POST['city_name'];
    $confirmPassword = $_POST['confirm_password'];
    if ($password == $confirmPassword) {
        $email = $funObj->isUserExist($emailid);
        if (!$email) {
            $register = $funObj->UserRegister($username, $emailid, $password, $ngo, $city);
            if ($register) {
                echo "<script>alert('Registration Successful')</script>";
            } else {