Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

Please Help PHP email!!!

New Here ,
Aug 03, 2009 Aug 03, 2009

Copy link to clipboard

Copied

HelloGuys

I am having a hard time getting my contact form to work via php, the problem is that whatever the customer puts in is not coming through to me only the field names please say you can help me

Here the codes

<?php>

/* Subject and Email Variables */
     
     $emailSubject = 'Speech Creative Inquires';
     $webMaster = 'emailname@mac.com';
    
/* Gathering Data Variables */

    $nameField = $_POST['fullname'];
     $companyField = $_POST['company'];
     $phoneField = $_POST['phone'];
     $emailField = $_POST['email'];
     $requestsField = $_POST['requests'];
    
     $body = <<<EOD
<br><hr><br>
Full Name: $fullname <br>
Company: $company <br>
Phone: $phone <br>
Email: $email <br>
Request: $requests <br>
EOD;

    $headers = "From: $email\r\n";
     $headers .= "Content-type: text/html\r\n";
     $success = mail($webMaster, $emailSubject, $body,
  $headers);
   
/* Results rendered as HTML */

    $theResults = <<<EOD
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Thank You from Speech Creative</title>
<style type="text/css">
<!--
body,td,th {
     color: #FFFFFF;
}
body {
     background-color: #000000;
     background-image: url(thanks.jpg);
     background-repeat: no-repeat;
}
.style4 {
     font-family: "Abadi MT Condensed Light";
     font-size: 24px;
}
-->
</style>
<script type="text/javascript">
<!--
function MM_swapImgRestore() { //v3.0
   var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a)&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
   var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
     var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
     if (a.indexOf("#")!=0){ d.MM_p=new Image; d.MM_p[j++].src=a;}}
}

function MM_findObj(n, d) { //v4.01
   var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
     d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
   if(!(x=d)&&d.all) x=d.all; for (i=0;!x&&i<d.forms.length;i++) x=d.forms;
   for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers.document);
   if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
   var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
    if ((x=MM_findObj(a))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
</head>

<body>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p align="center" class="style4">Thank You for your interest in Speech Creative, We will respond as soon as possible</p>
<p align="center" class="style4"> </p>
<p align="center" class="style4"><a href="home.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('home','','homeoff.jpg',0)"><img src="homeon.jpg" alt="Homepage" name="home" width="103" height="62" border="0" id="home" /></a></p>
</body>
</html>
EOD;
echo "$theResults";
?>

TOPICS
Server side applications

Views

886
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Aug 03, 2009 Aug 03, 2009

Copy link to clipboard

Copied

This question is asked frequently (daily) here in the forums. That said what trouble are you having that hasn't been answered in the many related discussions you've already searched for in this forum?

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 05, 2009 Aug 05, 2009

Copy link to clipboard

Copied

I'm having the exact same problem...we must have used the same video tutorial to code our form.

PLEASE let me know if you found the answer!

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Aug 06, 2009 Aug 06, 2009

Copy link to clipboard

Copied

Not the way to learn PHP, but you can save yourself a lot of effortfor $99.00

see http://www.webassist.com/software/universal-email/

I use it all the time with no problems.

Howard WAlker

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Aug 18, 2009 Aug 18, 2009

Copy link to clipboard

Copied

Go to my website for a DW extension for either php mail or pear mail/mail mime that automates the entire thing.  Just build any form with any form fields, and it will loop the lot and email to the addressed assigned.  Done deal in about 30 seconds.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Aug 18, 2009 Aug 18, 2009

Copy link to clipboard

Copied

LATEST

A bargain at $19.95 for those who do not have one already.

Howard Walker

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines