Jump to content

ben03

New Members
  • Posts

    5
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

ben03's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi, I have recived an enquiry from someone wishing to advertise on my site. The ad is 120x250px (to go on homepage) and they are looking at a monthly quote. We get 2000 hits per month. What sort of price would you consider? Thanks
  2. It doesn't seem to have displayed :'( The hosts said you have to use the -f parameter. What do you use for that if its sent from a html page? Yes the (mail); and the (header); part at the end of the code is what they asked me to use.
  3. I have been working on a webform which is new to me. When testing it I discovered the host company required 2 email addresses (normal one and root) in order to validate. So I had to add the code they suggested to the sendmail.php file as seen below. Will this validate and if not what would be the correct code in order for these problems to be corrected? Thanks. <html> <head> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body> <?php mail("service@site.com", "Register Interest Form Results", $_REQUEST[message], "From: $_REQUEST[email]", "-froot@site.com".$_REQUEST[email]); $MESSAGE_BODY = "Name: ".$_POST["name"]." "; $MESSAGE_BODY .= "Email: ".$_POST["email"]." "; $MESSAGE_BODY .= "Phone: ".$_POST["phone"]." "; $MESSAGE_BODY .= "Company: ".$_POST["company"]." "; $MESSAGE_BODY .= "Jobtitle: ".$_POST["jobtitle"]." "; $MESSAGE_BODY .= "Besttime2call: ".$_POST["besttime2call"]." "; $MESSAGE_BODY .= "Howdidyouhear: ".$_POST["howdidyouhear"]." "; $boxes = ''; if (isset($_POST['boxes']) && is_array($_POST['boxes'])) $boxes = implode(', ', $_POST['boxes']); $MESSAGE_BODY .= "Options: ".$boxes; $MESSAGE_BODY .= "Comment: ".nl2br($_POST["comment"])." "; mail($ToEmail, $EmailSubject, $MESSAGE_BODY) or die ("Failure"); header( "Location: http://www.site.com/thankyou.html" ); ?> </body> </html>
  4. That's great thanks for the help. With a checkbox list I have used this one line of code although there are 5 options. Is this correct? $MESSAGE_BODY .= "options: ".$_POST["boxes[]"]." "; "boxes[]" has been used for each of the 'name' attributes. Would the values then be displayed in the email for each of these selected?
  5. I am new to php and trying to get my head around sending an html form to an email address where it is sent via a sendmail.php page. The code I have done so far is below but am not sure if its correct/what needs correcting! Thanks. <?php $ToEmail = 'support@domain.com'; $EmailSubject = 'Site contact form '; $MESSAGE_BODY = "Name: ".$_POST["name"]."<br>"; $MESSAGE_BODY .= "Email: ".$_POST["email"]."<br>"; $MESSAGE_BODY .= "Phone: ".$_POST["phone"]."<br>"; $MESSAGE_BODY .= "Company: ".$_POST["company"]."<br>"; $MESSAGE_BODY .= "Jobtitle: ".$_POST["jobtitle"]."<br>"; $MESSAGE_BODY .= "Besttime2call: ".$_POST["besttime2call"]."<br>"; $MESSAGE_BODY .= "Howdidyouhear: ".$_POST["howdidyouhear"]."<br>"; $MESSAGE_BODY .= "options: ".$_POST["boxes[]"]."<br>"; $MESSAGE_BODY .= "Comment: ".nl2br($_POST["comment"])."<br>"; mail($ToEmail, $EmailSubject, $MESSAGE_BODY) or die ("Failure"); ?>
×
×
  • 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.