472,982 Members | 2,562 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,982 software developers and data experts.

Email help Form Request

I am using this php email form and it seems to work. But I would like
for
the option for attn$ Webmaster to go to a different email address than
the
mymail$
Please be Kind to us newbies...
can someone modify this and resend it so I can have the form send to 2
different email addresses? Or maybe three if that is possible determined

by what attn$ option is used.
the following is actually two files contact.html then sendeaml.php

<br>
<p style="text-align: center;" height="82" nowrap="nowrap"
valign="top"><b>
<font color="#0000cc" face="Pristina" size="6">
<span style="font-size: 36px; line-height: 44px;"><big>My WebPage for
Feedback</big><br soft="">
</span></font></b></p>
<div style="text-align: center;"><br>
</div>
<h1 style="text-align: center;"><strong>Feedback Page !</strong></h1>
<div style="text-align: center;"></div>
<p style="text-align: center;">&nbsp;</p>
<div style="text-align: center;"></div>
<form method="post" action="sendeail.php">
<div style="text-align: center;">
<input name="ip" value="&lt;?php echo $ipi ?&gt;" type="hidden"><input

name="httpref" value="&lt;?php echo $httprefi ?&gt;" type="hidden">
<input name="httpagent" value="&lt;?php echo $httpagenti ?&gt;"
type="hidden">
</div>
<center>
<div style="text-align: center;"><br>
Type of request:<br>
<select name="attn" size="1">
<option value=" option1 ">Option1 </option>
<option value=" Option2 ">Option2 </option>
<option value=" Option3 ">Option3 </option>
<option value=" Option4 ">Option4 </option>
<option value=" Option5 ">Option5 </option>
<option value=" Webmaster ">Webmaster </option>
</select>
<br>
<br>
Your Request:
<br>
<textarea name="request" rows="4" cols="50"></textarea><br>
<br>
Should this be a private message to me?
<select name="private" size="1">
<option value=" No">No </option>
<option value=" Yes">Yes </option>
</select>
<br>
<br>
Should I ask others to help with this?
<select name="share" size="1">
<option value=" No">No </option>
<option value=" Yes">Yes </option>
</select>
<br>
<br>
Do you want me to contact you?
<select name="reply" size="1">
<option value=" No">No </option>
<option value=" Yes">Yes </option>
</select>
<br>
<br>
Your Email: <input name="visitormail" size="35" type="text"><br>
<br>
Your Name: <input name="visitor" size="35" type="text"><br>
<br>
<input value="Send Mail" type="submit">
<br>
<center> <dd>&nbsp;</dd>

</center>
</form>
</body>
</html>


>>>After this is sendeal.php >>Before is

contact.html>>>>>>>>>>>>>>>>>>>>>>>>>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Sendemail Script</title>
</head>
<body>

<!-- Required: YOUR email ($myemail). Optional: Enter CC email address
($ccx)
Required: Add the link for the 'next page' (at the bottom) -->

<?php

$myemail = "me@mysite.com";
if(!$visitormail == "" && (!strstr($visitormail,"@") ||
!strstr($visitormail,".")))
{
echo "<h2>Use Back - Enter valid e-mail</h2>\n";
$badinput = "<h2>Feedback was NOT submitted</h2>\n";
}
if(empty($visitor) || empty($visitormail) || empty($request )) {
echo "<h2>Use Back - fill in all fields</h2>\n";
}
echo $badinput;

$todayis = date("l, F j, Y, g:i a") ;

$attn = $attn . "(" . $ccopy . ")" ;
$subject = $attn;

$notes = stripcslashes($notes);

$message = " $todayis [EST] \n
Type of Request: $attn \n
Message: $request \n
\n
Keep this Private: $private \n
Please ask others for Help: $share \n
Please Contact me: $reply \n
My Name is: $visitor \n
From: $visitor ($visitormail)\n
Additional Info : IP = $ip \n
Browser Info: $httpagent \n
Referral : $httpref \n
";

$from = "From: $visitormail\r\n";

if (($ccopy == "cc yes") && ($visitormail != ""))
mail($visitormail, $subject, $message, $from);

if ($myemail != "")
mail($myemail, $subject, $message, $from);

if ($ccx != "")
mail($ccx, $subject, $message, $from);

?>

<p align="center">
Date: <?php echo $todayis ?>
<br />
Thank You : <?php echo $visitor ?> ( <?php echo $visitormail ?> )
<br />

Type of request: <?php echo $attn ?>
<br />
Message:<br />
<?php $notesout = str_replace("\r", "<br/>", $request);
echo $notesout; ?>
<br />
<br /><br />
<a href="contact.html"> Make another request </a> <br />
<br />
<a href="index.html"> Back to Home Page </a>
</p>

</body>
</html>


Jul 17 '05 #1
0 1766

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: dmiller23462 | last post by:
Does anyone see anything OUTRIGHT that I can fix on this....I'm a virgin ASP'er and I'm trying to produce an email from a form submission button....This is just my little "template" for future use...
4
by: dmiller23462 | last post by:
So here's my problem.....I need to set up different email distributions based on which option in the following Select form has been chosen....For instance if "Putaway" is chosen it needs to email...
5
by: Paxton | last post by:
I created an html email containing a form whose method is POST. The form is posted to an asp page for processing, but no values are retrieved. So I response.write all the Request.Form fields, and...
3
by: Harry | last post by:
Hi, Can anyone help. I have a asp.net page (c#), with two panels, both of which have asp:textboxes on. When I press the first button, the second panel shows fine. When I press the button in...
1
by: socal | last post by:
I'm a PHP programmer, but was asked to look at a problem with a mail form using ASP (which I have never used before). I was able to figure out from Googling that the error message had to do with...
4
by: Ken D. | last post by:
I have an asp page that collects data on referrals. The user inputs the information and selects the rep to receive the referral. My data is being saved to a backend database (SQL) and the user is...
1
by: bonnie.tangyn | last post by:
Hello All In my ASP page, I use CDONT to send email to client. But, I need to allow user preview and edit the email content before sending it out. Any advices? I have two ASP pages -...
2
by: devine | last post by:
Hi All, I am trying to send an automatic email when an update has been made. My update statement will updates 6 fields, and dependant on one of the fields, I would like to send an email using CDO....
2
by: kennykenn | last post by:
Hi, Ive producd code to send an email after capturing info off a form,it works fine locally but when i put it live it doesnt work! the code is stopin at 'msg.send' any ideas, here the code! ...
2
by: sindhudixit | last post by:
Hey, I am having a user fill out a form then the fields are going to uploaded to my database. So, at this point, when the user hits the submit button I want three things to happen: 1. The...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
4
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.