Log in

View Full Version : Form Processing.



24
09-09-2005, 12:51 PM
I cant do this damn form thing. Its driving me madders :o . I just dont get it can anyone help me i know theres a tut for it but i dnt get it so does anyone have an example they could show me? I found this site where u can get the php free Here! (http://www.formtofile.com) but i just cant work it out. One of those things tht i just dont get. Bit like french could never understand tht @ skool lol. Anyways Plz help me :D

Michael.
09-09-2005, 03:18 PM
Mr Mentor has it for you:
http://www.habboxforum.com/showthread.php?t=26889

splintercell!
09-09-2005, 03:21 PM
Its simple really all you are doing is saying take the information from the form then collect it together and send it off to your email. You need to know basics of PHP to do it though.

24
09-09-2005, 07:09 PM
You need to know basics of PHP to do it though.
Hmmm slight problemo there. Any ideas of where i can get a basic quick fix for it instead :D

splintercell!
09-09-2005, 07:10 PM
Ill write you one quickly if you give the the fields you want but only the php bit. Cba writing out the html form :)

24
09-09-2005, 07:33 PM
Yey, wow thankyou :D

Name:
Email:
Message Subject:
Details:

splintercell!
09-09-2005, 07:41 PM
Ok so its


<?php
if ($_SERVER['REQUEST_METHOD'] != 'GET'){
$name = $_POST['name'];
$email = $_POST['email'];
$subject = $_POST['subject'];
$message = $_POST['message];
$email = "
Name: $name /n Email: $email /n Subject: $subject/n Message: $message /n
";
mail("YOUR EMAIL HERE", $subject, $email);
Header("Location: thanks.html");
}
else
{
echo "Sorry your message could not be sent. Go back and try again!";
}
?>

24
09-09-2005, 07:44 PM
Thankyou soooo much, just one last thing :D:D what does this mean?:
It should start with

HTML Code:

<form name="form" id="form" method="post" action="LOCATION.php">
LOCATION.php being the url of the form handler your using.
Whats the location just the URL for the site?

splintercell!
09-09-2005, 07:47 PM
uhuh ;) and make a file called thanks.html and just enter a thankyou message saying the message has been submitted etc!

24
09-09-2005, 07:50 PM
Okay Great Thanx sooo much :D +rep

splintercell!
09-09-2005, 08:10 PM
Ok heres the edited because I made some typos :)


<?php
if ($_SERVER['REQUEST_METHOD'] != 'GET'){
$name = $_POST['name'];
$email = $_POST['email'];
$subject = $_POST['subject'];
$message = $_POST['message'];
$email = "
Name: $name /n Email: $email /n Subject: $subject/n Message: $message /n
";
mail("YOUR EMAIL HERE", $subject, $email);
Header("Location: thanks.html");
}
else
{
echo "Sorry your message could not be sent. Go back and try again!";
}
?>

24
09-09-2005, 09:57 PM
kk Thanx, erm does geocities support php?
If not which free site could i ude to test it out on?

Mentor
09-09-2005, 11:43 PM
nope sorry, geocities is html only realy, athogh free-webhosts.com as i awlays suggest is a good place to look for any hosting u may want

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