PDA

View Full Version : Contact Form



Scania
30-07-2007, 08:08 PM
Im looking for a contact form EXACTLY like the one here; www.clubhabbo.net/clubhabbo/submitcontact.php

Do you think they got this off a coding website or something? If so, Do you think I could take it and change it to my own accord.

Regards

Sunny.
30-07-2007, 08:14 PM
I doubt theyd get it from a coding site... they probably made the code etc. I doubt they used a form generator if thts wht u mean.

Urm someone on here should hve the code. I remember someone sent me theres but i dont hve the code anymore :(

Scania
30-07-2007, 08:17 PM
I could just use the source? But I don't want grief if it is theres :(

Sunny.
30-07-2007, 08:21 PM
if you copy source it wont work as you need the file
send.php or sendmail.php or wteva its called.

Scania
30-07-2007, 08:31 PM
hmm :(

Assassinator
30-07-2007, 08:31 PM
You need to make a file called "send.php" with the infomation in which tells the form what to do and have the errors in like "Your form has been successfully submitted." and "There has been a error" etc.

And for the main bit "contact.php" you need something like


<form action="send.php" method="post">
<table border="0" align="center" cellpadding="3" cellspacing="0">
<tr>
<td>
<div align="right">
<div align="right"><font size="1" face="verdana">Habbo Name:</div>
</div></td>
<td><input name="habbo" type="text" id="habbo" style="font-family: Verdana; font-size: 10px; color: #000000;" size="40"></td>
</tr>
<tr>
<td><div align="right"><font size="1" face="verdana"> Email:</div></td>
<td><input name="email" type="text" id="email" style="font-family: Verdana; font-size: 10px; color: #000000;" size="40"></td>
</tr>
<tr>
<td><div align="right"><span><font size="1" face="verdana">Contact Reason:</span></div></td>
<td><select name="subject" style="font-family: Verdana; font-size: 10px; color: #000000;">
<option selected>Please Select a reason.</option>
<option value="Question">I have a question about ClubHabbo</option>
<option value="Link Request">Please Link my Habbo Fansite</option>
<option value="Site Error">I've spotted an error</option>
<option value="Complaint">I want to make a complaint</option>
<option value="Staff Report">I want to report a Staff Member</option>
<option value="Idea">I have an idea</option>
<option value="Forum Ban">I'm Banned on ClubHabbo Forum</option>
<option value="Other Reason">Other Reason</option>
</optgroup>
</select></td>
</tr>
<tr>
<td><div align="right"><font size="1" face="verdana"> Message:</div></td>
<td><textarea name="message" cols="45" rows="8" style="font-family: Verdana; font-size: 10px; color: #000000;" tabindex="3"></textarea></td>
</tr>
<tr>
<td>&nbsp;</td>
<td><input type="submit" style="font-family: Verdana; font-size: 10px; color: #000000;" name="B1" value="Submit Form" accesskey="s" style=" color: #000000;"></td>
</tr>
</table>
</form>

(Took from ClubHabbo)

Scania
30-07-2007, 08:38 PM
Yes I already have it, but I need the send.php ;(

Assassinator
30-07-2007, 08:44 PM
Yes I already have it, but I need the send.php ;(

I could get that.

Give me 10mins.

Edit: got it.


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html>




<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Sendemail Script</title>
</head>
<body>

<!-- Reminder: Add the link for the 'next page' (at the bottom) -->
<!-- Reminder: Change 'YourEmail' to Your real email -->

<?php
if(!$visitormail == "" && (!strstr($visitormail,"@") || !strstr($visitormail,".")))
{
echo "<h2>Use Back - Enter valid e-mail</h2>\n";
$badinput = "<h2>Feedback was NOT submitted</h2>\n";
echo $badinput;
}
if(empty($visitor) || empty($visitormail) || empty($notes )) {
echo "<h2>Use Back - fill in all fields</h2>\n";
}

$todayis = date("l, F j, Y, g:i a") ;

$attn = $attn ;
$subject = $attn;

$notes = stripcslashes($notes);

$message = " $todayis [EST] \n
Attention: $attn \n
Message: $notes \n
From: $visitor ($visitormail)\n
Additional Info : IP = $ip \n
Browser Info: $httpagent \n
Referral : $httpref \n
";

$from = "From: $visitormail\r\n";


mail("PUT YOUR EMAIL HERE", $subject, $message, $from);

?>

<p align="center">
Date: <?php echo $todayis ?>
<br />
Thank You : <?php echo $visitor ?> ( <?php echo $visitormail ?> )
<br />

Attention: <?php echo $attn ?>
<br />
Message:<br />
<?php $notesout = str_replace("\r", "<br/>", $notes);
echo $notesout; ?>
<br />
<?php echo $ip ?>

<br /><br />
<a href="LINK OF FORM HERE!"> Next Page </a>
</p>

</body>
</html>

And if you need the contact bit.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Email Form </title>
</head>
<body>

<form method="post" action="LINK OF THE SEND MAIL HERE">

<!-- DO NOT change ANY of the php sections -->
<?php
$ipi = getenv("REMOTE_ADDR");
$httprefi = getenv ("HTTP_REFERER");
$httpagenti = getenv ("HTTP_USER_AGENT");
?>

<input type="hidden" name="ip" value="<?php echo $ipi ?>" />
<input type="hidden" name="httpref" value="<?php echo $httprefi ?>" />
<input type="hidden" name="httpagent" value="<?php echo $httpagenti ?>" />


Your Name: <br />
<input type="text" name="visitor" size="35" />
<br />
Your Email:<br />
<input type="text" name="visitormail" size="35" />
<br /> <br />
<br />
Attention:<br />
<select name="attn" size="1">
<option value=" Sales n Billing ">Sales n Billing </option>
<option value=" General Support ">General Support </option>
<option value=" Technical Support ">Technical Support </option>
<option value=" Webmaster ">Webmaster </option>
</select>
<br /><br />
Mail Message:
<br />
<textarea name="notes" rows="4" cols="40"></textarea>
<br />
<input type="submit" value="Send Mail" />
</form>

</body>
</html>

Sunny.
30-07-2007, 08:50 PM
Try that ^^ but i got a feelin it wnt work.

Hxf Santa
30-07-2007, 08:50 PM
I can get you one

Invent
30-07-2007, 09:40 PM
It definately wont work if you have REGISTER_GLOBALS set to off.

ScottDiamond.
30-07-2007, 09:55 PM
ClubHabbo use the contact form 'Jme' has posted on their forum.

Scania
31-07-2007, 11:25 AM
Thread Closed

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