Email Form Help

Discussion in 'Programming' started by bbooker01, Jan 15, 2011.

  1. #1
    I was wondering if anyone could help me out with an email form. I want it to be exactly like the one on armorgames.com. Link here: http://armorgames.com/contact

    Here is the code, I know very little ajax/php and I dont know how to make this form send to a certain email.

    
    <p style="font-size:1.2em;"><strong>If you need help, make sure to <a href="#" title="FlashOverlord Help">check our FAQ</a> before sending your message.</strong></p>
    
    												<form action="/contact" method="post" id="contactform">
    					<input type="hidden" name="act" value="send" />
    					<fieldset>
    						<ol>
    							<li class="alt">
    								<label>Your Name:</label>
    								<input type="text" name="yourname" value="" class="" maxlength="100" />
    							</li>
    
    							<li>
    								<label>Your Email:  </label>
    								<input type="text" name="youremail" value="" />
    							</li>
    							<li class="alt">
    								<label>Subject:</label>
    								<select name="subject">
    									<option value="Help">Help</option>
    
    									<option value="Feedback">Feedback</option>
    									<option value="Business Offer">Business Offer</option>
    									<option value="Press Inquiries">Press Inquiries</option>
    									<option value="Infringement">Infringement</option>
    									<option value="License Games">License Games</option>
    									<option value="Other">Other</option>
    
    								</select>
    							</li>
    							<li>
    								<label>Message:</label>
    								<textarea name="message" rows="8" cols="40"></textarea>
    					      </li>
    						</ol>
    					</fieldset>
    
    					<p><input type="submit" value="&nbsp;Send Your Message &rarr;&nbsp;" /></p>
    				</form>
    			</div>
    
    
    </body>
    </html>
    Code (markup):
     
    bbooker01, Jan 15, 2011 IP
  2. Esky

    Esky Peon

    Messages:
    1
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Probably something along these lines

    
    mail("your@mail.com, $_POST["subject"], $_POST["yourname"]." [".$_POST["youremail"]."] has sent you an email!\n".$_POST["message"]);
    
    PHP:
    http://php.net/manual/en/function.mail.php
    http://www.w3schools.com/PHP/php_mail.asp
     
    Esky, Jan 17, 2011 IP
  3. newwebbie

    newwebbie Peon

    Messages:
    41
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    where is js and .php file?
     
    newwebbie, Jan 19, 2011 IP