Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Coding Forum


You are currently viewing our Coding Forum as a guest. Please register to participate.
Login



Reply
Old 12-11-2003, 10:18 AM <form> Problems!
Junior Talker

Posts: 2
Trades: 0
Hi all,

I am trying to setup a “contact us” page on my site and have come upon a problem I can’t fix.

I want 5 destination email addresses picked by radio buttons. In the main it is working OK, but no matter which destination you pick the email always goes through to the last one webmaster@mydomain.com.

The emails I receive when I test the form have the correct info, Enquiries if I pick enquiries or Sales if I pick sales, but always come through to the webmaster address.

I expect it is something quite simple because if I change the last email on the list to enquiries@mydomain.com all the mails come through to that address. Could someone have a look at my code and set me straight.

<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript" type="text/javascript">
<!--
function get_radio_value()
{
for (var i=0; i < 5; i++)
{
if (document.email.mail[i].checked)
{
var rad_val = document.email.e-mail[i].value;
}
}
}

//-->
</SCRIPT>
</head>

<body>
<table align="center" width="99%" border="1" cellpadding="5" cellspacing="1"> <form name="email" method="POST" action="../cgi-bin/formmail/formmail.cgi">
<td width="742" height="28">Speak to us about an existing order.</td>
<td width="150"><input type="radio" name="mail" value="Orders">
<inputtype="hidden"name="recipient"value=orders@my domain.com>
&nbsp;&nbsp;&nbsp;<b>Orders</b></td>
</tr>
<tr>
<td height="28">Talk to us about a past order.</td>
<td><input type="radio" name="mail" value="Sales">
<input type="hidden" name="recipient" value="sales@mydomain.com">
&nbsp;&nbsp;&nbsp;<b>Sales</b></td>
</tr>
<tr>
<td height="28">Mail us about anything related to mydomain.com</td>
<td><input type="radio" name="mail" value="Enquiries">
<input type="hidden" name="recipient" value="enquiries@mydomain.com">
&nbsp;&nbsp;&nbsp;<b>Enquiries</b></td>
</tr>
<tr>
<td height="28">Talk to our current featured artist.</td>
<td><input type="radio" name="mail" value="Joe">
<input type="hidden" name="recipient" value="joe@mydomain.com">
&nbsp;&nbsp;&nbsp;<b>Joe</b></td>
</tr>
<tr>
<td height="28">Inform us about any problems on this site.</td>
<td><input type="radio" name="mail" value="WebMaster">
<input type="hidden" name="recipient" value="webmaster@mydomain.com">
&nbsp;&nbsp;&nbsp;<b>WebMaster</b></td><br><br>
</tr>
<tr>
<td height="184" colspan="2" align="center" valign="top">
<table border='0' cellspacing='1' cellpadding='1' width='250'>
<tr>
<td width="100%" align="center"><br><font color="#FF0000">*</font>
Your Name:<input type="text" name="realname" size="30"><br><br>
<font color="#FF0000">*</font>Your Email:<input type="text" name="email" size="30"><br><br>
Subject:<input type="text" name="subject" size="81"><br>
Your Comments:<br><textarea name="comments" cols="70" rows="7"></textarea></td>
</tr>
</table><font size="1" color="#FF0000">*required</font>
</td>
</tr>
</table><br><center>
<input type="submit" name="Send" value=" Send " onClick="get_radio_value()"></center>
<input type="hidden" name="posted" value="1">
<input type="hidden" name="required" value="realname,email,comments">
<input type="hidden" name="redirect" value="http://www.mydomain.com/contact_us_submission.php">
</form><br><br>
</td>
</tr>
</table>
</body>
</html>


Thanks for your help,

Regards

PieMan
PieMan is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 12-11-2003, 12:16 PM
david's Avatar
King Spam Talker

Posts: 1,314
Location: Glasgow, UK
Trades: 0
For each item replace as follows:

Code:
<td><input type="radio" name="mail" value="Sales">
<input type="hidden" name="recipient" value="sales@mydomain.com">
   <b>Sales</b></td>
with
Code:
<td><input type="radio" name="recipient" value="sales@mydomain.com">

   <b>Sales</b></td>
__________________

Please login or register to view this content. Registration is FREE
- Everything a webmaster needs - for free

Please login or register to view this content. Registration is FREE
- Free web hosts reviewed and rated

Please login or register to view this content. Registration is FREE
- Impartial hosting directory - Add your host today for FREE
david is offline
Reply With Quote
View Public Profile
 
Old 12-11-2003, 08:37 PM
Junior Talker

Posts: 2
Trades: 0
Thanks very much, I'll try that.

Regards

Mike
PieMan is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to <form> Problems!
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

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





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.12399 seconds with 12 queries