PDA

View Full Version : [CODE] Radio Requests/Shoutouts Form.



SlicedCheese
22-10-2005, 10:47 AM
This is a code i posted on HabboForum that is just a simple Radio Requests/Shoutouts etc. Form.

request.html

<form action="sendrequest.php" method="post">Habbo Name<br> <br> <input type="text" size="40" name="name" style="font-family: verdana; font-size: 10px"><br> <br> Message Type<br> <br> <select size="1" name="type"> <option value="Request" selected>Request</option> <option value="Shout Out">Shout Out</option> <option value="Joke">Joke</option> <option value="Competition">Competition</option> <option value="Other">Other</option> </select><br> <br> Message<br> <br> <textarea rows="5" cols="24" name="message"></textarea><br> <br> <input type="submit" value="Send!" name="submit" style="font-family: verdana; font-size: 10px"></form>

sendrequest.php

<?php
if(isset($_POST['submit'])) {
$name = $_POST['name'];
$type = $_POST['type'];
$message = $_POST['message'];
mail("[email protected]", "$type from $name", "Habbo Name: $name \n Type: $type \n - Message - \n $message");
echo "Thank you for sending a message $name and keep tuned in!";
} else {
echo "Please use the Request Form to send requests! <a href='request.html'>< Back</a>";
}
?>

Lysine
22-10-2005, 11:22 AM
Very helpful codes.

Sygon
22-10-2005, 11:48 AM
Thats on habboforum :|

SlicedCheese
22-10-2005, 06:08 PM
If you read my post, you would see that i said that I posted it on HF

Mentor
22-10-2005, 06:13 PM
This is realy just a basic form and handler "/ would getting a flood of emails realy work as a request system if people wanted to go threw alot of them "/

Matt.
22-10-2005, 06:49 PM
Thats gr8 +rep

SlicedCheese
22-10-2005, 07:38 PM
Mentor, you're starting to get on my nerves, all the time you throw bad comments, in your signature it says that you'll tell me how to improve.

splintercell!
22-10-2005, 07:44 PM
Just make it abit more secure and advanced.. for example:


<?php
if(isset($_POST['submit'])) {
$name = $_POST['name'];
$type = $_POST['type'];
$message = $_POST['message'];
if((!$name) or (!$type) or (!$message)) {
echo "You have not filled in the request for properly!";
include("request.html");
exit();
}
else{
mail("[email protected]", "$type from $name", "Habbo Name: $name \n Type: $type \n - Message - \n $message");
echo "Thank you for sending a message $name and keep tuned in!";
} else {
echo "Please use the Request Form to send requests! <a href='request.html'>< Back</a>";
}
}
?>

Mentor
22-10-2005, 07:53 PM
Mentor, you're starting to get on my nerves, all the time you throw bad comments, in your signature it says that you'll tell me how to improve.
actaly read the post, i asked a question, not throwing bad comments, unless u actaly want to debat that its a basic form handler, wich would be kinda pointless it being a script to handle then send forms to an email, making it one by deffitions "/

Im asking how useful it would be, would flooding my inbox with 20 emails help me, on a radio, or would u want an altemated page to dispaly all the data on wich i can easly and quicky edit and remove bits from, and see them all at once with catogry sepetions "/

How am i suggesting you imrpove, by considering whos going to use the appliction and make ing it useful, and with something anyone who glances at the odd tutoral on the net coulnt make in 15 seconds "/
Or do u think that is useful, do u think that would work, would u yourself use it?

SlicedCheese
22-10-2005, 08:04 PM
actaly read the post, i asked a question
Normally, questions have question marks.
I've only been coding php for the last couple of months, so before you start throwing all your gibberish at me i suggest saying it in my language, english.

O and thank you splintercell! hopefully your code will teach me in the future.

Mentor
22-10-2005, 08:09 PM
Normally, questions have question marks.
I've only been coding php for the last couple of months, so before you start throwing all your gibberish at me i suggest saying it in my language, english.

Sorry i gave you to much credit then think you would be able to understand something from the context.

Personly i find it insulting getting 10/10 its great, bla bla bla after somthing, Since if id spent a few months hard work on it, youd get the same as someone who shoves a freewebs site up in 5 minutes, it means nothing.
If someone critises, points out problmes, then your script imrpoves, then when they say somethings good it actaly holds some weight.
And yes, if i post somthing feel free to critisise as the majorty of people still dont wich is pretty annoying when your trying to work the bugs out of a script or find out wich arias need imrpoveing.

What would u prefer, a zombising, "good work, thats useful" or some cristism, advice on where to imrpove, whats wrong with it, etc etc, and then actly getting credit when u do do somthing good, rather than another load of the same stuff u got for some **** "/

Luckyrare
22-10-2005, 08:25 PM
Yes, I agree...

If people just said

"Thats cool"

You would never get better...

People saying you can make it more secure or what ever needs adding can only help.

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