please enter your email id :
<? @$search = $_POST['results1']; if(isset($_POST['results'])) { //$host="localhost"; // Host name //$username="super"; // Mysql username //$password=" "; // Mysql password //$db_name="info"; // Database name $db_name = "info"; //Connect to server and select databse . mysql_connect('localhost', 'super', ' ')or die("cannot connect to server"); mysql_select_db("$db_name")or die("cannot select DB"); // value sent from form $email_to=$search; // table name $tbl_name='members'; // retrieve password from table where e-mail = $email_to([email protected]) $sql="SELECT passwd FROM $tbl_name WHERE email_id= '$email_to' "; $result5=mysql_query($sql); // if found this e-mail address, row must be 1 row // keep value in variable name "$count" $count=mysql_num_rows($result5); // compare if $count =1 row if($count==1){ $rows=mysql_fetch_array($result5); // keep password in $your_password $your_password=$rows['passwd']; // ---------------- SEND MAIL FORM ---------------- // send e-mail to ... $to=$email_to; // Your subject $subject="Your password here"; // From $header="from: personalized information seeking"; // Your message $messages= "Your password for login to our website \r\n"; $messages.="Your password is".$your_password."\r\n"; //$messages.="more message... \r\n"; // send email $sentmail = mail($to,$subject,$messages,$header); }// else if $count not equal 1 else { echo "Not found your email in our database"; } // if your email succesfully sent if($sentmail){ echo "Your Password Has Been Sent To Your Email Address."; } else { echo "Cannot send password to your e-mail address"; } } ?>this is my code regarding the php mail… pls can u tell me how shud i be connecting to be able to send mail