Reply
Need Some Help Peoples...
Old 05-10-2004, 09:27 PM Need Some Help Peoples...
WaHoOoO!'s Avatar
Mentally Unstable Tugboat Captain

Posts: 797
Name: Chad
Location: /usr/bin/perl
Hey peoples, it's your favorite village idiot...asking for some help. I want to have an e-mail script for my contact page. Basically, I want a person to have some fields: name, e-mail, comments...and then select a name from a dropdown menu. Based on which selection they choose from the menu, that decides who the e-mail goes to. Get it?

Basically, here's the form:

Name ____________
E-Mail ___________
Comments ______________
Email To: [MENU]

Thanks in advance to whoever can do this.
__________________
He's baaaaaaaack....
WaHoOoO! is offline
Reply With Quote
View Public Profile Visit WaHoOoO!'s homepage!
 
When You Register, These Ads Go Away!
Old 05-13-2004, 05:34 PM HEre is your solution
Duasun's Avatar
Novice Talker

Posts: 6
Code:
<?php


if ($action==""){

echo "<form name='form1' action='this_script.php?action=send' 
method='post'>";

echo "Your name:<br><input type='text' name='name'><br>

Your email:<br><input type='text' name='email_user'><br>

Comments:<br><textarea name='comment'></textarea><br>"; 
// Feel free to change this code
echo "  <br>Send email to: <select name='email'>

      <option selected>webmaster@email.com</option>";// Change this oprions

echo '      <option>admin@email.com</option>
    </select>
<br><br>
    <input type="submit" name="Submit" value="Send email">
  </p>
</form>

';

}

if ($action=="send"){

$subject="New comment from :".$name;// Change it if you wish

mail ("$email","$subject","$comment","From: $email_user");

}

?>


Well, i wrote this code, try it, it isn't tested, but it should work!
Duasun is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Need Some Help Peoples...
 

Thread Tools

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
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.11130 seconds with 12 queries