Forum Moderators: coopster
I'm working on my 'contactpage' and i really want to have a form that looks like this page:
<snipped url per TOS [webmasterworld.com]>
Can anyone help me with that? Here is what I've got so far:
<html>
<head>
<title>Contact</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
body {
background-color: #FFFFFF;
}
-->
</style>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_jumpMenu(targ,selObj,restore){ //v3.0
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}
//-->
</script>
</head>
<form action="../">
<select name="sendEmailTo">
<option value="mailto:bookings@example.com">Bookings (bookings@example.com)</option>
<option value="mailto:info@example.com">The Band (info@example.com)</option>
<option value="mailto:nick@example.com">Nick (nick@example.com)</option>
<option value="mailto:boj@example.com">Boj (boj@example.com)</option>
<option value="mailto:rob@example.com">Rob (rob@example.com)</option>
<option value="mailto:joep@example.com">Joep (joep@example.com)</option>
</select>
</p>
<p> <textarea name="textarea" cols="43" rows="5" wrap="physical">Enter Comments Here
</textarea>
</p>
<p>
<input
type="button"
value="Send"
onclick="location.href=this.form.sendEmailTo.options[sendEmailTo.selectedIndex].value">
</form>
</p>
</form>
</body>
</html>
it opens up the mail programm of the visitors when they press 'send' and I want it to be send immediately from the site to the chosen e-mail adress.. Can anyone help, please?
BTW, I know that my server has all the ASP, PHP etc. capability, but still i don't know how to do it..
[edited by: coopster at 2:55 pm (utc) on June 13, 2005]
[edit reason] generalized urls and emails per TOS [/edit]
I you don't know php, then use a ready script from www.hotscripts.com
Best regards
Michal Cibor
PS. With ASP I don't know how to do that, but you may ask here on ASP forum
well, first you would alter the form action to point to a script. In this case a php script. You would also need to remove the onClick event from the button and make it a regular submit button. In the targetted script you would need to process the posted values and then you could send the email using the function mcibor mentioned. You would also have to make some changes to the values in your select box.
You may want to look through these though
[hotscripts.com...]
Basics of Submitting and Emailing Forms with PHP [webmasterworld.com]
"Parse error: parse error, unexpected T_ELSE in /home/music/public_html/test.php on line 272"
Can anyone help me with that?
[edited by: coopster at 4:38 pm (utc) on June 15, 2005]
[edit reason] snipped unnecessary code [/edit]