473,770 Members | 6,978 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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;"><stron g>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="sendeai l.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="visitorma il" 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>Sendemai l 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(!$visitormai l == "" && (!strstr($visit ormail,"@") ||
!strstr($visito rmail,".")))
{
echo "<h2>Use Back - Enter valid e-mail</h2>\n";
$badinput = "<h2>Feedba ck was NOT submitted</h2>\n";
}
if(empty($visit or) || empty($visitorm ail) || 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($visitorma il, $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.h tml"> Make another request </a> <br />
<br />
<a href="index.htm l"> Back to Home Page </a>
</p>

</body>
</html>


Jul 17 '05 #1
0 1829

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

Similar topics

1
1457
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 (I have several pages that will require online submission) I'm not getting any emails and I'm not even getting the confirmation page that I defined....ANY HELP WOULD BE GREAT.... Thanks in advance
4
3019
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 User1@here.whatever and User4@here.whatever but if "Loaded" is chosen it needs to email User2@here.whatever and User3@here.whatever, etc, etc... I'm aware that the only thing that really needs to change is the "Mail.AddAddress" line (at least...
5
2457
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 nothing appears. I change the form's method to GET, then response.write the Request.QueryString items (which I can see in the URL) and it works fine. I need to use POST, as the quantity of data from the form will often exceed the limits of...
3
1887
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 the second panel, it triggers the script to send the form details by email.
1
1530
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 Microsoft no longer using CDONTS and now I can actually get it to send it to my address. But, I'm having a problem interpreting the form data that was setup. Here's what the person hired years ago had (basically, it's just one text field (email)...
4
2346
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 receiving a confirmation page after hitting the Submit button. Now, what I need is a way to have an email sent to the rep that is selected in the drop down list on the asp form. I have a SQL table containing the reps and corresponding email...
1
2342
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 - h_email.asp and h_email_action.asp Inside the h_email.asp, I create a form and allow user to input information for the email.
2
2850
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. Once the update is made, I am trying to re-query the database to retrieve all the fields that need to be included in the email, but it's just not working for me!! This my code to update <% Set Conn = Server.CreateObject("ADODB.Connection")...
2
2491
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
2317
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 form uploads to a database (the following code does this) 2. An e-mail is sent to my sales team as well as the customer, which contains the form values . 3. I want the user to then be directed automatically to another webpage, after they hit the...
0
9591
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10228
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10057
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10002
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9869
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8883
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6676
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5312
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5449
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.