HighDots Forums  

Submitted form message

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss Submitted form message in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Cobejero
 
Posts: n/a

Default Submitted form message - 04-01-2009 , 09:21 AM






Hello,

I have a form on the website I'm working on and it has a confirmation message
for after it's been submitted. Here is the code already in place:

<?php
} else {
error_reporting(0);
$recipient = 'email (AT) abc (DOT) com';
$subject = "Service Request Form";
$msg = "Service Request from: $ename\n\n" .stripslashes($_POST['MsgBody']);
$headers = "From: " . $_POST['Email'];

if (mail($recipient,$subject,$msg,$headers)) {
echo nl2br("[b]Thank you for your request - your message was sent.");
echo (" Click here to go back to the home page.");
}
else {
echo ("Message failed to send");
echo ("Click here to go back to the Request Form.");
}
}
?>

How do I insert a link or button back to the home page? This was already built
and the "click here" doesn't appear to be working.

Thank you,
Caroline


Reply With Quote
  #2  
Old   
Murray *ACE*
 
Posts: n/a

Default Re: Submitted form message - 04-01-2009 , 09:30 AM






echo ('<a href="index.php">Click here to go back to the home page.</a>');


--
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
==================


"Cobejero" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
Hello,

I have a form on the website I'm working on and it has a confirmation
message
for after it's been submitted. Here is the code already in place:

?php
} else {
error_reporting(0);
$recipient = 'email (AT) abc (DOT) com';
$subject = "Service Request Form";
$msg = "Service Request from: $ename\n\n"
.stripslashes($_POST['MsgBody']);
$headers = "From: " . $_POST['Email'];

if (mail($recipient,$subject,$msg,$headers)) {
echo nl2br("[b]Thank you for your request - your message was
sent.");
echo (" Click here to go back to the home page.");
}
else {
echo ("Message failed to send");
echo ("Click here to go back to the Request Form.");
}
}
?

How do I insert a link or button back to the home page? This was already
built
and the "click here" doesn't appear to be working.

Thank you,
Caroline



Reply With Quote
  #3  
Old   
Cobejero
 
Posts: n/a

Default Re: Submitted form message - 04-02-2009 , 10:39 AM



Thanks, I bet you slapped yourself on the forehead )

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



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.