PDA

View Full Version : PHP Contact Form



James!
14-04-2006, 09:42 AM
I need a PHP contact form with the fields:

Name:
Email:
Subject: (drop down lists; Personal, Suggestions, Jobs, Other)
Message:

Repx2 for whoever can make me one!

Email to: [email protected] (not an MSN)

ClubTime
14-04-2006, 10:02 AM
I can make on i think ill give it a try

Mentor
14-04-2006, 04:20 PM
I have a tutoral if u are interested in learning how 2 do it yourself "/ http://thybag.co.uk/index.php?p=Tutorials&ind=2

Judas
14-04-2006, 07:12 PM
Your rep power is only 1 ?

mat64 (Forum Moderator) - Please stay on topic!

Rob
14-04-2006, 07:18 PM
Your rep power is only 1 ?
What's that got to do with a contact form o_O

Bomb-Head
14-04-2006, 07:35 PM
What's that got to do with a contact form o_O

I was thinking that lol

Liam.
14-04-2006, 10:45 PM
<?php
// ## Contact Form

if($_POST['action'] == "send")
{
$msg .= "The Habbo Contact\n\n";
$msg .= "Name: ".$_POST['name']."\n";
$msg .= "Email: ".$_POST['email']."\n";
$msg .= "Reason: ".$_POST['reason']."\n";
$msg .= "Message:\n";
$msg .= $_POST['message']."\n\n";
$msg .= "IP: ".$_SERVER['REMOTE_ADDR'];
mail("[email protected]", "The Habbos Contact", $msg, "From: ".$_POST['email']."\nReply-To: ".$_POST['email']."\n");
echo '<p align="center">Thankyou for contacting us Your e-mail will be replied to as soon as possible.<br />You are now being redirected to the homepage</p>';
}
else
{
?>
<form action="" method="post">
<input type="hidden" name="action" value="send">
<table width="100%" cellspacing="2" cellpadding="0" border="0">
<tr>
<td><b>Habbo Name</b></td>
<td><input type="text" name="name" size="40"></td>
</tr>
<tr>
<td><b>Email Adress</b></td>
<td><input type="text" name="email" size="40"></td>
</tr>
<tr>
<td><b>Reason for contact</b></td>
<td>
<select name="reason">
<option>PersonalContact</option>
<option>Suggestions</option>
<option>Jobs</option>
<option>Other</option>
</select>
</td>
</tr>
<tr>
<td valign="top"><b>Message</b></td>
<td><textarea name="message" cols="40" rows="4"></textarea></td>
</tr>
<tr>
<td>&nbsp;</td>
<td><input type="submit" value="Submit">&nbsp;<input type="reset" value="Reset"></td>
</tr>
</table>
</form>
<?
}
?>

Want to hide these adverts? Register an account for free!