thanks for helping me guys. here is my basic sendmail.php <?php $from = 'test@testing.threadpunk.com'; $to = 'sakib.live@gmail.com'; $subject = "Product order at angross.com"; $plan = $_POST['product']; $extrapages = $_POST['additional']; $purpose = $_POST['mainpurpose']; $visitordetails = $_POST['visitorsdetails']; $youlike = $_POST['sitesyoulike']; $dontlike = $_POST['sitesyoudontlike']; $colortheme = $_POST['colorguides']; $adddetails = $_POST['details']; $logopref = $_POST['logo']; $fname = $_POST['firstname']; $lname = $_POST['lastname']; $comname = $_POST['companyname']; $mailadd1 = $_POST['email1']; $mailadd2 = $_POST['email2']; $pass1 = $_POST['password']; $pass2 = $_POST['password2']; $phonenumber = $_POST['phone']; $straddress = $_POST['streetaddress']; $cityname = $_POST['city']; $statename = $_POST['state']; $zip = $_POST['postal']; $name = $_POST['country']; $howfind = $_POST['howfindus']; foreach($_POST['check'] as $value) { $check_msg .= "Checked: $value\n"; } mail("$to", "$subject", "$plan \n $extrapages \n $purpose \n $visitordetails \n $youlike \n $dontlike \n $sitesyoudontlike \n $colortheme \n $adddetails \n $logopref \n $fname \n $lname \n $comname \n $mailadd1 \n $mailadd2 \n $pass1 \n $pass2 \n $phonenumber \n $straddress \n $cityname \n $statename \n $zip \n $name \n $howfind \n $check_msg","From:$from"); ?> Code (markup): Can someone please configure it to check whether two password fields are same or not. if OK script just send a mail, if not OK script just display error message that email fields are not same or password fields are not same. Someone gave me this code <?php if(($_POST["email"] == $_POST["email2"]) && ($_POST["password"]==$_POST["password2"])){ //If all fields are valid header('Location:success.html'); } else { //If they are not valid header('Location:failed.html'); } ?> Code (markup): but i dont know enough php to use it one more thing, mail client inbox is showing 'from' correctly but send-by is hostgator.com. I don't even know this little thing Thanks
put the second code before : mail("$to", "$s..... PHP: and create success.html ,failed.html in root ... I guess that's it !!