Jump to content

Spot the not?


bilis_money

Recommended Posts

can you something wrong with these codes?

 

<?php
if (isset($_POST['Submit'])){
    $recepient = "contact@mydomain.com";
    $subject = "You have Guest! from mydomain.com";

    $contents = "First Name:  " . $_POST['fname'] .
    			"\n\nLast Name:  " . $_POST['lname'] .
    			"\n\nStreet1:  " . $_POST['st1'] .
    			"\n\nStreet2:  " . $_POST['st2'] .
    			"\n\nCity:  " . $_POST['city'] .
    			"\n\nState:  " . $_POST['state'] .
    			"\n\nZip code:  " . $_POST['zcode'] .
			"\n\nCountry code:  " . $_POST['countcode'] .
    			"\n\nCountry:  " . $_POST['country'] .
    			"\n\nPhone number:  " . $_POST['pnumber'] .
    			"\n\nE-mail address:  " . $_POST['email'] .
    			"\n\nEnquiry:  " . $_POST['enquiry'];
}

    $headers = "Reply-to: contact@mydomain.com\n";
    mail($recepient, $subject, $contents, "From: contact@mydomain.com");
?>

Link to comment
Share on other sites

Thanks guys but actually the server is not set to display error messages.

 

That's why i don't know where to look for the specific problem too.

 

 

But that script is not really working.

I wonder why?

 

 

 

check error_php.log file ,if you can't access it then use ini_set (check php manual) to override your server setting, to display errors

 

Link to comment
Share on other sites

This is an uninformational post.  You are going to have to detail out your problem, if the mail is not sending it could be multiple things.  If it's not properly setting the from header, it could be multiple things.  You are going to have to be more specific as far as what is "actually" not happening, or is happening incorrectly.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.