Jump to content

Sixmax

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Everything posted by Sixmax

  1. So i would like to rename the emails i have written in options in HTML to "contact1", "contact2" and so on, and just write their emails in the PHP?
  2. Okay - now i have made the HTML look: <form method="post" action="contact.php"> <table border="0" cellpadding="0" cellspacing="0" align="left"> <tr> <td><h3 style="border-bottom:1px solid black;">Contact</h3></td> </tr> <tr> <td> <label for="Name" style="display:block;margin-bottom:5px;">Name:</label><input type="text" name="Name" id="Name" value="" maxlength="" style="width:200px;"><div style="clear:left;height:20px;"> </div> <label for="Email" style="display:block;margin-bottom:5px;">Email:</label><input type="text" name="Email" id="Email" value="" maxlength="" style="width:200px;"><div style="clear:left;height:20px;"> </div> <label style="display:block;margin-bottom:5px;" for="Receiver">Receiver:</label><select name="Receiver" id="Receiver"><option value="[email protected]">Person 1</option><option value="[email protected]">Person 2</option><option value="[email protected]">Person 3</option><option value="[email protected]">Person 4</option></select><div style="clear:left;height:20px;"> </div> <label for="Name" style="display:block;margin-bottom:5px;">Subject:</label><input type="text" name="Name" id="Name" value="" maxlength="" style="width:200px;"><div style="clear:left;height:20px;"> </div> <label for="Message" style="display:block;margin-bottom:5px;">Message:</label><textarea name="Message" id="Message" style="width:200px;height:200px;"></textarea><div style="clear:left;height:20px;"> </div> </td> <tr> <td align="left"> <input type="submit" value=" Submit "> <input type="reset" value=" Reset "> </td> </tr> </table> </form> The question is now - how to create the contact.php so that if "Person 2" is chosen at the drop down box, then the mail is sent to the correct email (in this case [email protected] - just example emails). I have seen a lot of free copy-pasteable forms on the net, but they only handle the possibility of one receiver - not to choose between different receivers. Hope that some PHP freak got the answer :-) Sixmax
  3. Great links! But I still have problems making the drop down box where the writer can choose receiver. Any suggestions? Sixmax
  4. Hey I was wondering how to make an email contact form in PHP. I have tried to write one in HTML, but I can't do that if I want some functions. This is what I want of functions: A contact form where people on my homepage can write a message to different persons, like: 1) Name. 2) Email. 3) A field where people can choose whom to send the message to (like a drop down box). 4) Subject. 5) Message. 6) A submit button where (if the form is filled out correctly) people get an pop-up that the message is send correctly. I am totally new to PHP, so if anybody got a link to a guide, or maybe got a premade code, it would be very nice. Thanks in advance. Sixmax
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.