PDA

View Full Version : Submit:s



Matt.
16-04-2006, 10:41 AM
Hi, Bondie has made this but we don't know how to make it submit:( Please can someone help? I will +Rep =]

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<style type="text/css">
<!--
.style1 {
font-size: 9px;
font-family: verdana;
}
.style2 {
color: #FF0000;
font-weight: bold;
}
-->
</style>
</head>

<body>
<p class="style1">Ever wanted the chance to work at Habboteam, Well
<label for="textfield"></label>
heres your chance all you got to do is fill out the form below and well we will get back to you with in a week. If you would like a djing job please check the dj applications page. <br />
<br />
<span class="style2">ALL JOBS DO NOT PAY SORRY. </span></p>
<form id="form1" name="form1" method="post" action="">
<p class="style1">Habbo Name:
<input type="text" name="textfield" id="textfield" />
<br />
Email Address:
<label for="label"></label>
<input type="text" name="textfield2" id="label" />
<br />
Hotel:
<label for="select"></label>
<select name="select" id="select">
<option selected="selected">Uk</option>
<option>Usa</option>
<option>Ca</option>
<option>Au</option>
<option>Sg</option>
<option>Other</option>
</select>
<br />
Job:
<label for="label2"></label>
<select name="select2" id="label2">
<option>Event staff</option>
<option>Competition staff</option>
<option>Newsreporter</option>
<option>Interviewer</option>
<option>Reviewer</option>
<option>Site webdesigner</option>
<option>Forum moderator</option>
</select>
<br />
Reasons for wanting the job:<br />
<label for="textarea"></label>
<textarea name="textarea" cols="40" rows="5" id="textarea"></textarea>
<br />
Reasons why we should take you on board:<br />
<label for="label3"></label>
<textarea name="textarea2" cols="40" rows="5" id="label3"></textarea>
<br />
Final Comments (Not required):<br />
<label for="label4"></label>
<textarea name="textarea3" cols="40" rows="5" id="label4"></textarea>
<br />
<br />
<label for="Submit"></label>
<input type="submit" name="Submit" value="Submit" id="Submit" />
</p>
</form>
</body>
</html>

Johno
16-04-2006, 10:49 AM
Im not too sure but I think its cos the button does not link to like config.php or something

Matt.
16-04-2006, 10:51 AM
Im not too sure but I think its cos the button does not link to like config.php or something
I would not know what to put in the config.php file:'(

Mentor
16-04-2006, 11:15 AM
well u need to make a form handler, or use a free online servis or somthing, then put that as the action in the form tag

Liam.
16-04-2006, 11:30 AM
I made you one, here you go. Haven't tested it but should work.



<?php
// ## Contact Form

if($_POST['action'] == "send")
{
$msg .= "Contact\n\n";
$msg .= "Name: ".$_POST['name']."\n";
$msg .= "Email: ".$_POST['email']."\n";
$msg .= "Hotel: ".$_POST['hotel']."\n";
$msg .= "Job: ".$_POST['why']."\n";
$msg .= "Why you should get the job: ".$_POST['why']."\n";
$msg .= "Why we should take you on board: ".$_POST['board']."\n";
$msg .= "Final Comments: ".$_POST['comments']."\n";
$msg .= "Message:\n";
$msg .= $_POST['message']."\n\n";
$msg .= "IP: ".$_SERVER['REMOTE_ADDR'];
mail("[email protected]", "Website Contact", $msg, "From: ".$_POST['email']."\nReply-To: ".$_POST['email']."\n");
echo '<p align="center">Thankyou message after form has been submitted</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>Hotel:</b></td>
<td>
<select name="why">
<option>UK</option>
<option>USA</option>
<option>CA</option>
<option>AU</option>
<option>SG</option>
<option>Other</option>
</select>
</td>
</tr>
<tr>
<td><b>Job:</b></td>
<td>
<select name="job">
<option>Events Staff</option>
<option>Competition Staff</option>
<option>News Reporter</option>
<option>Interviewer</option>
<option>Reviewer</option>
<option>Site Webdesigner</option>
<option>Forum Moderator</option>
</select>
</td>
</tr>
<tr>
<td valign="top"><b>Reasons for wanting the job</b></td>
<td><textarea name="why" cols="40" rows="4"></textarea></td>
</tr>
<tr>
<td valign="top"><b>Reasons why we should take you on board</b></td>
<td><textarea name="board" cols="40" rows="4"></textarea></td>
</tr>
<tr>
<td valign="top"><b>Final Comments (not required)</b></td>
<td><textarea name="comments" 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>
<?
}
?>

Matt.
16-04-2006, 11:42 AM
Thank you! It works:) +Rep

Liam.
16-04-2006, 12:00 PM
no problem

Bielby2ooo
16-04-2006, 12:07 PM
I could of made you a HTML one :P

PHP to hard for me

Splinter
16-04-2006, 05:43 PM
I could of made you a HTML one :P

PHP to hard for me
No such thing as a HTML form handler "/

Bielby2ooo
16-04-2006, 05:44 PM
oh ok

-runs-

Splinter
16-04-2006, 05:46 PM
oh ok

-runs-
tool! *beats*

Bielby2ooo
16-04-2006, 06:07 PM
-weeps in corner-

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