Adobe Dreamweaver Forums



Last 10 THreads :         Placing movie clip layer in the background (Last Post : szieminski@gmail.com - Replies : 0 - Views : 1 )           »          spry menubars not lining up in IE (Last Post : coftscootourb - Replies : 148 - Views : 536 )           »          display strips leading 0 (Last Post : Azadi - Replies : 1 - Views : 2 )           »          Image enlarge on mouse-over (Last Post : accicalacrism - Replies : 5 - Views : 190 )           »          net links (Last Post : almanson - Replies : 2 - Views : 3 )           »          mx 04 versus cs3 pro (Last Post : richard - Replies : 0 - Views : 1 )           »          Locking resize handles in browser. (Last Post : Jasper Thayer - Replies : 3 - Views : 4 )           »          Flash buttons don't work (Last Post : Murray *ACE* - Replies : 2 - Views : 3 )           »          Does DW CS3 write better php than DWMX2004? (Last Post : Murray *ACE* - Replies : 1 - Views : 2 )           »          PagesThemselves Look OK After Removing Link, But WhenSecond Nav Bar is Used Formatting is Lost (Last Post : Murray *ACE* - Replies : 5 - Views : 6 )           »         


Home Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
User Info Statistics
Go Back   Adobe Dreamweaver Forums > Dreamweaver: Main > Dreamweaver General
 
Tags:

Reply
  #1 (permalink)  
Old 07-16-2008, 08:04 PM
Guperman
 
Posts: n/a
Diggs:
Default Form to Mail PHP

Hi there.

I am using the exact PHP script for two web sites, both hosted by the same
company. The company in question claims the same script would not work because
the troubled site's server uses PHP 5.

Could someone please have a look at the script below and tell me where I'm
going wrong.

Or could someone please send me a PHP script for 'name, email and comments'
that could be applied with an HTML confirmation notice.

Thank you very much

<?php

/* subject and email variables */


$subject = 'Comments from website';
$to = 'gustav@stage.co.za';

/* Gathering Data Variables */


$nameField = $_POST['name'];
$commentField = $_POST['comments'];
$emailField = $_POST['email'];

$body = <<<EOD
<br><hr><br>

Name: $name <br>
Email: $email <br>
Comments: $comments <br>

EOD;

$headers = "From: $email\r\n";
$headers .= "Content-type: text/html\r\n";
ini_set("sendmail_from", "gustav@gandor.tv");
$success = mail($to, $subject, $body, $headers);



/* Results rendered as HTML */

$theResults = <<<EOD

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Personal Concierge of St. Thomas</title>
<link href="concierge.css" rel="stylesheet" type="text/css" />
<!--[if IE 5]>
<style type="text/css">
/* place css box model fixes for IE 5* in this conditional comment */
#sidebar1 { width: 230px; }
</style>
<![endif]-->
<!--[if IE]>
<style type="text/css">
/* place css fixes for all versions of IE in this conditional comment */
#sidebar1 { padding-top: 30px; }
#mainContent { zoom: 1; }
/* the above proprietary zoom property gives IE the hasLayout it needs to
avoid several bugs */
</style>
<![endif]-->
<style type="text/css">
<!--
-->
</style>
<script src="SpryAssets/SpryEffects.js" type="text/javascript"></script>

<script type="text/javascript">
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if
((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight;
onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH)
location.reload();
}
MM_reloadPage(true);

function MM_showHideLayers() { //v9.0
var i,p,v,obj,args=MM_showHideLayers.arguments;
for (i=0; i<(args.length-2); i+=3)
with (document) if (getElementById && ((obj=getElementById(args[i]))!=null))
{ v=args[i+2];
if (obj.style) { obj=obj.style;
v=(v=='show')?'visible'v=='hide')?'hidden':v; }
obj.visibility=v; }
}
function MM_effectHighlight(targetElement, duration, startColor, endColor,
restoreColor, toggle)
{
Spry.Effect.DoHighlight(targetElement, {duration: duration, from: startColor,
to: endColor, restoreColor: restoreColor, toggle: toggle});
}
function MM_effectGrowShrink(targetElement, duration, from, to, toggle,
referHeight, growFromCenter)
{
Spry.Effect.DoGrow(targetElement, {duration: duration, from: from, to: to,
toggle: toggle, referHeight: referHeight, growCenter: growFromCenter});
}
//-->
</script>

</head>

<body>



<div id="container">

<div id="sidebar1"><br />
<a href="index.html" onmouseover="MM_effectHighlight(this, 100, '#003366',
'#CCCCCC', '#003366', true)">home</a><br />
<a href="about.html" onmouseover="MM_effectHighlight(this, 100, '#003366',
'#CCCCCC', '#003366', true)">about</a><br />
<a href="Ourservice.html" onmouseover="MM_effectHighlight(this, 100,
'#003366', '#CCCCCC', '#003366', true)">our service</a><br />
<a href="stateSide.html" onmouseover="MM_effectHighlight(this, 100,
'#003366', '#CCCCCC', '#003366', true)">state side</a><br />
<a href="gallery.html" onmouseover="MM_effectHighlight(this, 100, '#003366',
'#CCCCCC', '#003366', true)">picture gallery</a><br />
<a href="contact.html" onmouseover="MM_effectHighlight(this, 100, '#003366',
'#CCCCCC', '#003366', true)">contact us</a></div>

<!-- end #sidebar1 -->
<div id="mainContent"> <span class="heading_18"> &gt;&gt; thank
you</span><br />

<div id="contact_confirmation"><br />
Thank you for making contact with Personal Concierge of St. Thomas.<br />
<br />
We are currently experiencing problems with receiving emails from the
website, so please contact me on 340-690-3542
<br />
<br />
<br />
Yours sincerely<br />
D'Lynn</div>

<br />
<br />

<div id="apSmallPicDlynn"><img src="images/contact_dlynn.jpg" alt=""
width="150" height="99" onload="MM_effectGrowShrink(this, 200, '0%', '100%',
false, false, true)" /></div>


</div>
<!-- This clearing element should immediately follow the #mainContent div in
order to force the #container div to contain all child floats -->

</div>

<div id="footer">website powered by <a
href="http://www.gandor.tv">gandor.tv</a></div>

</body>
</html>

EOD;
echo "$theResults";

?>

Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 07-17-2008, 12:47 PM
Murray *ACE*
 
Posts: n/a
Diggs:
Default Re: Form to Mail PHP

I see nothing in there that would be a problem in PHP5. What happens when
you try to use this script? Are you hosted on Windows or *nix?

--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
==================


"Guperman" <webforumsuser@macromedia.com> wrote in message
news:g5lj2b$e0k$1@forums.macromedia.com...
> Hi there.
>
> I am using the exact PHP script for two web sites, both hosted by the same
> company. The company in question claims the same script would not work
> because
> the troubled site's server uses PHP 5.
>
> Could someone please have a look at the script below and tell me where I'm
> going wrong.
>
> Or could someone please send me a PHP script for 'name, email and
> comments'
> that could be applied with an HTML confirmation notice.
>
> Thank you very much
>
> <?php
>
> /* subject and email variables */
>
>
> $subject = 'Comments from website';
> $to = 'gustav@stage.co.za';
>
> /* Gathering Data Variables */
>
>
> $nameField = $_POST['name'];
> $commentField = $_POST['comments'];
> $emailField = $_POST['email'];
>
> $body = <<<EOD
> <br><hr><br>
>
> Name: $name <br>
> Email: $email <br>
> Comments: $comments <br>
>
> EOD;
>
> $headers = "From: $email\r\n";
> $headers .= "Content-type: text/html\r\n";
> ini_set("sendmail_from", "gustav@gandor.tv");
> $success = mail($to, $subject, $body, $headers);
>
>
>
> /* Results rendered as HTML */
>
> $theResults = <<<EOD
>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> <html xmlns="http://www.w3.org/1999/xhtml">
> <head>
> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
> <title>Personal Concierge of St. Thomas</title>
> <link href="concierge.css" rel="stylesheet" type="text/css" />
> <!--[if IE 5]>
> <style type="text/css">
> /* place css box model fixes for IE 5* in this conditional comment */
> #sidebar1 { width: 230px; }
> </style>
> <![endif]-->
> <!--[if IE]>
> <style type="text/css">
> /* place css fixes for all versions of IE in this conditional comment */
> #sidebar1 { padding-top: 30px; }
> #mainContent { zoom: 1; }
> /* the above proprietary zoom property gives IE the hasLayout it needs to
> avoid several bugs */
> </style>
> <![endif]-->
> <style type="text/css">
> <!--
> -->
> </style>
> <script src="SpryAssets/SpryEffects.js" type="text/javascript"></script>
>
> <script type="text/javascript">
> <!--
> function MM_reloadPage(init) { //reloads the window if Nav4 resized
> if (init==true) with (navigator) {if
> ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
> document.MM_pgW=innerWidth; document.MM_pgH=innerHeight;
> onresize=MM_reloadPage; }}
> else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH)
> location.reload();
> }
> MM_reloadPage(true);
>
> function MM_showHideLayers() { //v9.0
> var i,p,v,obj,args=MM_showHideLayers.arguments;
> for (i=0; i<(args.length-2); i+=3)
> with (document) if (getElementById &&
> ((obj=getElementById(args[i]))!=null))
> { v=args[i+2];
> if (obj.style) { obj=obj.style;
> v=(v=='show')?'visible'v=='hide')?'hidden':v; }
> obj.visibility=v; }
> }
> function MM_effectHighlight(targetElement, duration, startColor, endColor,
> restoreColor, toggle)
> {
> Spry.Effect.DoHighlight(targetElement, {duration: duration, from:
> startColor,
> to: endColor, restoreColor: restoreColor, toggle: toggle});
> }
> function MM_effectGrowShrink(targetElement, duration, from, to, toggle,
> referHeight, growFromCenter)
> {
> Spry.Effect.DoGrow(targetElement, {duration: duration, from: from, to:
> to,
> toggle: toggle, referHeight: referHeight, growCenter: growFromCenter});
> }
> //-->
> </script>
>
> </head>
>
> <body>
>
>
>
> <div id="container">
>
> <div id="sidebar1"><br />
> <a href="index.html" onmouseover="MM_effectHighlight(this, 100,
> '#003366',
> '#CCCCCC', '#003366', true)">home</a><br />
> <a href="about.html" onmouseover="MM_effectHighlight(this, 100,
> '#003366',
> '#CCCCCC', '#003366', true)">about</a><br />
> <a href="Ourservice.html" onmouseover="MM_effectHighlight(this, 100,
> '#003366', '#CCCCCC', '#003366', true)">our service</a><br />
> <a href="stateSide.html" onmouseover="MM_effectHighlight(this, 100,
> '#003366', '#CCCCCC', '#003366', true)">state side</a><br />
> <a href="gallery.html" onmouseover="MM_effectHighlight(this, 100,
> '#003366',
> '#CCCCCC', '#003366', true)">picture gallery</a><br />
> <a href="contact.html" onmouseover="MM_effectHighlight(this, 100,
> '#003366',
> '#CCCCCC', '#003366', true)">contact us</a></div>
>
> <!-- end #sidebar1 -->
> <div id="mainContent"> <span class="heading_18"> &gt;&gt; thank
> you</span><br />
>
> <div id="contact_confirmation"><br />
> Thank you for making contact with Personal Concierge of St. Thomas.<br
> />
> <br />
> We are currently experiencing problems with receiving emails from the
> website, so please contact me on 340-690-3542
> <br />
> <br />
> <br />
> Yours sincerely<br />
> D'Lynn</div>
>
> <br />
> <br />
>
> <div id="apSmallPicDlynn"><img src="images/contact_dlynn.jpg" alt=""
> width="150" height="99" onload="MM_effectGrowShrink(this, 200, '0%',
> '100%',
> false, false, true)" /></div>
>
>
> </div>
> <!-- This clearing element should immediately follow the #mainContent div
> in
> order to force the #container div to contain all child floats -->
>
> </div>
>
> <div id="footer">website powered by <a
> href="http://www.gandor.tv">gandor.tv</a></div>
>
> </body>
> </html>
>
> EOD;
> echo "$theResults";
>
> ?>
>


Reply With Quote
  #3 (permalink)  
Old 07-24-2008, 04:20 PM
Guperman
 
Posts: n/a
Diggs:
Default Re: Form to Mail PHP

Thanks Murray

Fortunately the server had an option of Windows and Linux platforms. I asked
them to move my site to the Windows platform, and my submission form worked.

Now I'm doing a site for a client who's with a server with a Linux platform
and I find myself with the same problem again. Below please find the php file I
use. On testing I do receive the email but a very empty email. Much appreciated.

<?php

/* subject and email variables */


$emailSubject = 'Reservation Day Trip with Jimmy Felix';
$to = '2005@stage.co.za';


/* Gathering Data Variables */


$nameField = $_POST['name'];
$peopleField = $_POST['people'];
$timeField = $_POST['time9am10am'];
$timeField2 = $_POST['time12am1pm'];
$timeField2 = $_POST['check'];


$body = "<<<EOD
<br><hr><br>

Name: $name <br>
People: $people <br>
Time: $time9am10am <br>
Time2: $time12am1pm <br>
TermsConditionsChecked: $check <br>

EOD";

$headers = "From: $email\r\n";
$headers .= "Content-type: text/html\r\n";
ini_set("sendmail_from", "2005@stage.co.za");
$success = mail($to, $emailSubject, $body, $headers);



/* Results rendered as HTML */

$theResults = <<<EOD




<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Untitled Document</title>
<script src="SpryAssets/SpryEffects.js" type="text/javascript"></script>
<script src="SpryAssets/SpryAccordion.js" type="text/javascript"></script>
<script type="text/javascript">
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if
((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight;
onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH)
location.reload();
}
MM_reloadPage(true);
function MM_effectHighlight(targetElement, duration, startColor, endColor,
restoreColor, toggle)
{
Spry.Effect.DoHighlight(targetElement, {duration: duration, from: startColor,
to: endColor, restoreColor: restoreColor, toggle: toggle});
}
function MM_goToURL() { //v3.0
var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}
//-->
</script>
<link href="style.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.style1 {font-family: Verdana, Arial, Helvetica, sans-serif}
.style2 {font-size: 85%}
-->
</style>
<link href="SpryAssets/SpryAccordion.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
-->
</style>
</head>

<body>
<div id="Container">
<div id="Header">
<div class="HeaderText"> <span class="dottedUnderline">st.thomas day
trips</span> </div></div>
<div id="MainContent">

<div id="menu">
<div class="menu">
<p><span onclick="MM_goToURL('parent','index.html');return
document.MM_returnValue"
onmouseover="MM_effectHighlight(this, 100, '#ffffff', '#DDE2E0', '#ffffff',
true)"> home ::</span></p>
<p><span onclick="MM_goToURL('parent','about.html');return
document.MM_returnValue"
onmouseover="MM_effectHighlight(this, 100, '#ffffff', '#dde2e0', '#ffffff',
true)">about ::</span></p>
<p><span onclick="MM_goToURL('parent','maps.html');return
document.MM_returnValue"
onmouseover="MM_effectHighlight(this, 100, '#ffffff', '#dde2e0', '#ffffff',
true)">maps ::</span></p>
<p><span onclick="MM_goToURL('parent','gallery.html');retur n
document.MM_returnValue" onmouseover="MM_effectHighlight(this, 100, '#ffffff',
'#dde2e0', '#ffffff', true)">gallery ::</span></p>
<p><span onclick="MM_goToURL('parent','reservations.html'); return
document.MM_returnValue" onmouseover="MM_effectHighlight(this, 100, '#ffffff',
'#dde2e0', '#ffffff', true)">reservations ::</span></p>
</div>
</div>
<br />
<div id="Accordion1" class="Accordion" tabindex="0">
<div class="AccordionPanel">
<div class="AccordionPanelTab">:: CONFIRMATION</div>
<div class="AccordionPanelContent">
<div id="MainContentP">
<h1 class="Headings">Thank you for your reservation!</h1>
We appreciate your business

<p>Your driver's name is <span class="emphasisRedBold">Jimmy
Felix</span>.</p>
<p>Don't forget your camera!</p>
<p>Lastly, don't forget to tell a friend about this tour - and the free
Rum Punch at the Rum Factory...</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><br />
</p>
</div>
</div>
</div>
<div class="AccordionPanel">
<div class="AccordionPanelTab">:: REMEMBER</div>
<div class="AccordionPanelContent">
<div id="MainContentP">

<h1 class="Headings">Don't feed the inguanas!</h1>
<div class="floatLeft">
<img src="images/inguana.jpg" /> </div>Although we treat our inguanas
like you treat your labradors, they are prehistoric creatures who don't digest
man made food well.<br /><br />
Besides, we won't go about feeding your labradors. It's not cool! <br
/><br />
But don't worry, where I take you there aren't many inguanas.

<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
</div>
</div>
</div>
</div>
</div>
<div id="Footer">Powered by gandor.tv</div>
<div id="Footer2"></div>

</div>

<script type="text/javascript">
<!--
var Accordion1 = new Spry.Widget.Accordion("Accordion1");
//-->
</script>
</body>
</html>

EOD;
echo "$theResults";

?>

Reply With Quote
  #4 (permalink)  
Old 07-24-2008, 06:18 PM
Gary White
 
Posts: n/a
Diggs:
Default Re: Form to Mail PHP

On Thu, 24 Jul 2008 15:43:40 +0000 (UTC), "Guperman"
<webforumsuser@macromedia.com> wrote:

> $body = "<<<EOD
> <br><hr><br>
>
> Name: $name <br>
> People: $people <br>
> Time: $time9am10am <br>
> Time2: $time12am1pm <br>
> TermsConditionsChecked: $check <br>
>
> EOD";


The above is wrong. Try it like this:

$body = <<<EOD
<br><hr><br>

Name: $name <br>
People: $people <br>
Time: $time9am10am <br>
Time2: $time12am1pm <br>
TermsConditionsChecked: $check <br>

EOD;

Gary
Reply With Quote
  #5 (permalink)  
Old 07-25-2008, 01:05 PM
Guperman
 
Posts: n/a
Diggs:
Default Re: Form to Mail PHP

Thanks Gary

My original script was as you suggested. Then I got advised to add the
quotation marks. I've changed it back to what it was but with no luck. Any
advice would be much appreciated. Might it be because the contact form is
within an Spry accordion?

<?php

/* subject and email variables */


$emailSubject = 'Reservation Day Trip with Jimmy Felix';
$to = 'gustav@stage.co.za';


/* Gathering Data Variables */


$nameField = $_POST['name'];
$peopleField = $_POST['people'];
$timeField = $_POST['time9am10am'];
$timeField2 = $_POST['time12am1pm'];
$timeField2 = $_POST['check'];


$body = <<<EOD
<br><hr><br>

Name: $name <br>
People: $people <br>
Time: $time9am10am <br>
Time2: $time12am1pm <br>
TermsConditionsChecked: $check <br>

EOD;

$headers = "From: $email\r\n";
$headers .= "Content-type: text/html\r\n";
ini_set("sendmail_from", "gustav@stage.co.za");
$success = mail($to, $emailSubject, $body, $headers);



/* Results rendered as HTML */

$theResults = <<<EOD




<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Untitled Document</title>
<script src="SpryAssets/SpryEffects.js" type="text/javascript"></script>
<script src="SpryAssets/SpryAccordion.js" type="text/javascript"></script>
<script type="text/javascript">
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if
((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight;
onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH)
location.reload();
}
MM_reloadPage(true);
function MM_effectHighlight(targetElement, duration, startColor, endColor,
restoreColor, toggle)
{
Spry.Effect.DoHighlight(targetElement, {duration: duration, from: startColor,
to: endColor, restoreColor: restoreColor, toggle: toggle});
}
function MM_goToURL() { //v3.0
var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}
//-->
</script>
<link href="style.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.style1 {font-family: Verdana, Arial, Helvetica, sans-serif}
.style2 {font-size: 85%}
-->
</style>
<link href="SpryAssets/SpryAccordion.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
-->
</style>
</head>

<body>
<div id="Container">
<div id="Header">
<div class="HeaderText"> <span class="dottedUnderline">st.thomas day
trips</span> </div></div>
<div id="MainContent">

<div id="menu">
<div class="menu">
<p><span onclick="MM_goToURL('parent','index.html');return
document.MM_returnValue"
onmouseover="MM_effectHighlight(this, 100, '#ffffff', '#DDE2E0', '#ffffff',
true)"> home ::</span></p>
<p><span onclick="MM_goToURL('parent','about.html');return
document.MM_returnValue"
onmouseover="MM_effectHighlight(this, 100, '#ffffff', '#dde2e0', '#ffffff',
true)">about ::</span></p>
<p><span onclick="MM_goToURL('parent','maps.html');return
document.MM_returnValue"
onmouseover="MM_effectHighlight(this, 100, '#ffffff', '#dde2e0', '#ffffff',
true)">maps ::</span></p>
<p><span onclick="MM_goToURL('parent','gallery.html');retur n
document.MM_returnValue" onmouseover="MM_effectHighlight(this, 100, '#ffffff',
'#dde2e0', '#ffffff', true)">gallery ::</span></p>
<p><span onclick="MM_goToURL('parent','reservations.html'); return
document.MM_returnValue" onmouseover="MM_effectHighlight(this, 100, '#ffffff',
'#dde2e0', '#ffffff', true)">reservations ::</span></p>
</div>
</div>
<br />
<div id="Accordion1" class="Accordion" tabindex="0">
<div class="AccordionPanel">
<div class="AccordionPanelTab">:: CONFIRMATION</div>
<div class="AccordionPanelContent">
<div id="MainContentP">
<h1 class="Headings">Thank you for your reservation!</h1>
We appreciate your business

<p>Your driver's name is <span class="emphasisRedBold">Jimmy
Felix</span>.</p>
<p>Don't forget your camera!</p>
<p>Lastly, don't forget to tell a friend about this tour - and the free
Rum Punch at the Rum Factory...</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><br />
</p>
</div>
</div>
</div>
<div class="AccordionPanel">
<div class="AccordionPanelTab">:: REMEMBER</div>
<div class="AccordionPanelContent">
<div id="MainContentP">

<h1 class="Headings">Don't feed the inguanas!</h1>
<div class="floatLeft">
<img src="images/inguana.jpg" /> </div>Although we treat our inguanas
like you treat your labradors, they are prehistoric creatures who don't digest
man made food well.<br /><br />
Besides, we won't go about feeding your labradors. It's not cool! <br
/><br />
But don't worry, where I take you there aren't many inguanas.

<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
</div>
</div>
</div>
</div>
</div>
<div id="Footer">Powered by gandor.tv</div>
<div id="Footer2"></div>

</div>

<script type="text/javascript">
<!--
var Accordion1 = new Spry.Widget.Accordion("Accordion1");
//-->
</script>
</body>
</html>

EOD;
echo "$theResults";

?>

Reply With Quote
  #6 (permalink)  
Old 07-26-2008, 12:57 PM
Gary White
 
Posts: n/a
Diggs:
Default Re: Form to Mail PHP

On Fri, 25 Jul 2008 12:46:01 +0000 (UTC), "Guperman"
<webforumsuser@macromedia.com> wrote:

> My original script was as you suggested. Then I got advised to add the
>quotation marks. I've changed it back to what it was but with no luck. Any
>advice would be much appreciated. Might it be because the contact form is
>within an Spry accordion?


What happens when you try it?

Gary
Reply With Quote
  #7 (permalink)  
Old 07-26-2008, 06:48 PM
Guperman
 
Posts: n/a
Diggs:
Default Re: Form to Mail PHP

Hi Gary

You asked me what happens if I send the form. When I send it I do receive an
email, but with no content. Like this:

From: <daytripv@host94.hostmonster.com>
Date: Sun, 20 Jul 2008 16:32:57 -0600
To: <myemailaddress>
Subject: (which is correct)

Name:
People:
Time:
Time2:
TermsConditionsChecked:

_________________

> My original script was as you suggested. Then I got advised to add the
>quotation marks. I've changed it back to what it was but with no luck. Any
>advice would be much appreciated. Might it be because the contact form is
>within an Spry accordion?


What happens when you try it?

Gary

Reply With Quote
  #8 (permalink)  
Old 07-27-2008, 12:03 PM
Gary White
 
Posts: n/a
Diggs:
Default Re: Form to Mail PHP

On Sat, 26 Jul 2008 16:32:08 +0000 (UTC), "Guperman"
<webforumsuser@macromedia.com> wrote:

> You asked me what happens if I send the form. When I send it I do receive an
>email, but with no content. Like this:


First, double check that the form's method is set to post, not get.
Then, for debugging purposes, Try this to see what the script is
seeing.

<?php

print "<pre>\n";
print_r($_POST);
exit("</pre>\n");

/* subject and email variables */

$emailSubject = 'Reservation Day Trip with Jimmy Felix';
$to = 'gustav@stage.co.za';

/* Gathering Data Variables */

Gary
Reply With Quote
  #9 (permalink)  
Old 07-28-2008, 05:42 PM
Guperman
 
Posts: n/a
Diggs:
Default Re: Form to Mail PHP

Gary wrote:
>First, double check that the form's method is set to post, not get.
>Then, for debugging purposes, Try this to see what the script is
>seeing.


<?php

print "<pre>\n";
print_r($_POST);
exit("</pre>\n");

Hi Gary. The following is what comes up when I click the submission button
after I have inserted the above script:

Array
(
[name] => test
[people] => 3
[arrival] => 5/3?08
[time] => between 12am-1pm
[cruiseship] => Liliship
[check] => Yes I\'ve read the terms and conditions
[submit] => Submit
)


Reply With Quote
  #10 (permalink)  
Old 07-28-2008, 10:09 PM
Gary White
 
Posts: n/a
Diggs:
Default Re: Form to Mail PHP

On Mon, 28 Jul 2008 17:10:37 +0000 (UTC), "Guperman"
<webforumsuser@macromedia.com> wrote:

> Array
> (
> [name] => test
> [people] => 3
> [arrival] => 5/3?08
> [time] => between 12am-1pm
> [cruiseship] => Liliship
> [check] => Yes I\'ve read the terms and conditions
> [submit] => Submit
> )


Okay. Here is your code from the form processing:

$nameField = $_POST['name'];
$peopleField = $_POST['people'];
$timeField = $_POST['time9am10am'];
$timeField2 = $_POST['time12am1pm'];
$timeField2 = $_POST['check'];


$body = <<<EOD
<br><hr><br>

Name: $name <br>
People: $people <br>
Time: $time9am10am <br>
Time2: $time12am1pm <br>
TermsConditionsChecked: $check <br>

EOD;


First, note the elements you're trying to use from the $_POST array
are:
name, people, time2am10am, time12am1pm, and check.

The actual form fields are:
name, people, time, cruiseship, and check.

Note also the variables you are assigning the form results to:

$nameField, $peopleField, $timeField, $timeField2, and (curiously)
$timeField2 again.

The variables you're putting into the message are:

$name, $people, $time8am10am, $time12am1pm and $check.

Try it this way:

$name = $_POST['name'];
$people = $_POST['people'];
$arrival = $_POST['arrival'];
$time = $_POST['time9am10am'];
$cruiseship = $_POST['cruiseship'];
$check = $_POST['check'];


$body = <<<EOD
<br><hr><br>

Name: $name <br>
People: $people <br>
Arrival: $arrival <br>
Time: $time <br>
Cruiseship: $cruiseship <br>
TermsConditionsChecked: $check <br>

EOD;

Gary
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



© Camley Interactive (camley.info) 2008 - all logos and images are copywrite their respective owners.
Proud member of the Camley Interactive Network
All times are GMT. The time now is 12:58 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
Inactive Reminders By Mished.co.uk