<?php

    include_once 'includes/session.php';
    include_once 'includes/constants.php';
    include_once 'includes/functions.php';

    $partners = new partners;
    $partners->connection($host,$user,$pass,$db);

    /**************************variables***************************************/
    $login		=trim($_POST['login']);       //login email id     
    $flag		=trim($_POST['flag']);         //differentiate merchant and affiliate
    /**************************************************************************/



    /***********************checking type of login*****************************/
    if  ($flag=='affiliate')
          $type='a';                          //affilaite login
    else
         $type='m';                           //merchant login
    /**************************************************************************/

     $sql        ="SELECT * FROM partners_login where login_email='$login'  and login_flag='$type'";
     $result     =mysql_query($sql);
     echo mysql_error();

    if(mysql_num_rows($result)>0)
            {
            $row    =mysql_fetch_object($result);
            $Err="Your Password has been send to your Email Id!!!! ";
            }
    else
           {
            $Err="Invalid Id";
           }
       header("location:index2.php?Err=$Err$action=forgotpass");
?>

