i have problem with my code, it didn't say any error but it wont receive a data from the textfield.. is there something wrong with my code?
here is the code..
<?php
include('config.php');
$email=$_REQUEST['email'];
$sql ="SELECT * from employee where emp_work_email = '$email'";
$hasil=mysql_query($sql) or die("E-mail is invalid".mysql_error());
$data=mysql_fetch_array($hasil);
$sql1 ="select emp_password from employee where emp_work_email = '$email' ";
$hasil1= mysql_query($sql1) or die("Password is not match".mysql_error());
$data1=mysql_fetch_array($hasil1);
if($data == $email)
{
$to=$email;
$subject="This is your password";
$header="<no-reply@lms.com>";
$message="Your password is";
$message.= data1;
$sentmail = mail($to,$subject,$message,$header);
}
else
{
echo" not found email in your database";
}
if($sentmail){
echo"Your password already sent to your email";
}
else{
echo" cannot send to the email";
}
?>
when i run it, it show that not found email in your database..
can someone help me please? :(