Charan Gadhvi International Foundation
[insert_php] global $wpdb;
$errors =array();
@session_start();
if(isset($_POST[‘username’]) && !empty($_POST[‘username’]) && isset($_POST[‘password’]) && !empty($_POST[‘password’]))
{
$username = $_POST[‘username’];
$password = $_POST[‘password’];
$results = $wpdb->get_results( “SELECT * FROM wp_members where username = ‘”.$username.”‘ and password = ‘”.md5($password).”‘”);
if(count($results) == 0)
{
$errors[] = “Please enter valid Username and Password.”;
}
else
{
$_SESSION[‘ID’] = $results[0]->ID;
$_SESSION[‘USERNAME’] = $username;
$_SESSION[‘FNAME’] = $results[0]->fname;
wp_redirect(“http://cgif.org.in/index.php/matrimony-membership/”);
exit;
}
}

echo “

“.implode(” “,$errors).’

‘;
[/insert_php]

Member Login

New Member?  Sign Up
Forget password?