People are rambling about forms so im giving this a little bump *wistles inccently*
Ps. tut systesm up, Ish, its teh layoust thingy thats casuing problems is i need 2 figure out how 2 do an upload system "/

Aaaagh mine refuses to work
The form itsself is at http://www.habbophunk.com/request.html. When I full it in it gives me some complicated message that I don't get
I've posted the code below. Wold you mind looking through and checking what the mistake is?
Thanks.
The censored part is our e-mailsHTML Code:<?php if ($_SERVER['REQUEST_METHOD'] != 'GET'){ $mess = $_POST['habbo']; $mess = $_POST['type']; $mess = $_POST['dj']; $mess = $_POST['message']; $messig = " Habbo Name: $mess \n Message Type: $mess \n Current DJ: $mess \n Message: $mess "; $subject = $habbo; mail($mailto, $subject, $messig); $tool = $_POST['dj']; // now its a varible //next we do the if stament if($dj == "DJ Frobberwob"){$mailto = "andygreen1000********.com" ;} elseif($dj == "DJ Acid"){$mailto = "Ziffachan********.com" ;} else {die("Error, no one to send email to"); } Header("Location: requestconfirm.php"); } else { echo 'ERROR'; } ?>![]()
whats the contact codes?
Originally Posted by Acidude
Aaaagh mine refuses to work
The form itsself is at http://www.habbophunk.com/request.html. When I full it in it gives me some complicated message that I don't get
I've posted the code below. Wold you mind looking through and checking what the mistake is?
Thanks.
The censored part is our e-mailsHTML Code:<?php if ($_SERVER['REQUEST_METHOD'] != 'GET'){ $mess = $_POST['habbo']; $mess = $_POST['type']; $mess = $_POST['dj']; $mess = $_POST['message']; $messig = " Habbo Name: $mess \n Message Type: $mess \n Current DJ: $mess \n Message: $mess "; $subject = $habbo; mail($mailto, $subject, $messig); $tool = $_POST['dj']; // now its a varible //next we do the if stament if($dj == "DJ Frobberwob"){$mailto = "andygreen1000********.com" ;} elseif($dj == "DJ Acid"){$mailto = "Ziffachan********.com" ;} else {die("Error, no one to send email to"); } Header("Location: requestconfirm.php"); } else { echo 'ERROR'; } ?>
you seem to have amade a few mistakes in how php works by assigning many differnt things the same varible for exsmple.
i was planing to ad full code exsamples but they stupuidly disabled the edit function "/
anyway
try this
All avibles have the own unice varible to store to, plus the mail to varible in your own was after the mail function wich sends the email itself wich is most likly what was throwing up all the errors, hope that helpsPHP Code:<?php
if ($_SERVER['REQUEST_METHOD'] != 'GET'){
$mess1 = $_POST['habbo'];
$mess2 = $_POST['type'];
$mess3 = $_POST['dj'];
$mess4 = $_POST['message'];
$messig = "
Habbo Name: $mess1
\n
Message Type: $mess2
\n
Current DJ: $mess3
\n
Message: $mess4
";
$subject = $mess1;
$tool = $_POST['dj']; // now its a varible
//next we do the if stament
if($mess3 == "DJ Frobberwob"){$mailto = "andygreen1000********.com" ;}
elseif($mess3 == "DJ Acid"){$mailto = "Ziffachan********.com" ;}
else {die("Error, no one to send email to"); }
mail($mailto, $subject, $messig);
Header("Location: requestconfirm.php");
}
else
{
echo 'ERROR';
}
?>![]()
YAYAYAYAYAY!
WH00T! IT WORKS!
Thanks dude!
*Gives rep*
Now all I need to sort out is the radio issues XD
I need something that will count how many letters are being typed in a letter box and when it reachs 144 it wont let you type any more, anyone know how to build one?
Wow this tutorial was written ages ago![]()
I know![]()
ok im still not a 100 what u mean.Originally Posted by SamMaddock
I need something that will count how many letters are being typed in a letter box and when it reachs 144 it wont let you type any more, anyone know how to build one?
u can limit amount of letters able to enter with the max lengh attribute
Or do u want javascript to activty type whats being entered.Code:maxlength="144"
Heres a quick code, im not great a javascript and this is off the top of my head so may not work
Exsmaple of useCode:<script> function CheckLength() { MessageLength = document.FORMNAME.BITNAME.value.length; Out = MessageLength - 144 ; alert(Out + " charciters remaining"); } </script>
Code:<script> function CheckLength() { MessageLength = document.FORMNAME.BITNAME.value.length; Out = MessageLength - 144 ; alert(Out + " charciters remaining"); } </script> <br> <script> CheckLength(); </script> <form name="FORMNAME" method="post" action=""> <input type="text" name="BITNAME"> </form><br> <a href='javascript:CheckLength()'>Check Post Length</a>
Want to hide these adverts? Register an account for free!