PDA

View Full Version : Forms!



RyanDOT
16-11-2008, 12:55 PM
OK, im starting on IzCool main site now. I want to start on the things which i hate doing. And first its the forms. Im crap at forms, so can someone put it into a code. I need 2 forms, 1 for subdomains, the other for a general form.

SubDomain Form:

Name: [TEXT]
Email Address: [TEXT]
Desired SubDomain: [PERSON CAN WRITE HERE].izcool.com
[< NO-ONE CAN
OVERWRITE IZCOOL.COM]
Why you want the SubDomain: [TEXT]
What to write in subdomain: [TEXT]
What image to put in subdomain:

[B]General Form:

Name:
Email Address:
Category: >General Site
>General Forum
>Errors & Problems
>Advertisements
>Job Applications
Information: [TEXT BOX]

SUBMIT!

It lead to a email address, 1st form: [email protected]
2nd form: [email protected]

+Rep, may also give out month VIP if it works.
Want it custom, not from a site or whatever.

Jxhn
16-11-2008, 01:53 PM
<form name="subdomain" action="subdomainprocess.php" method="post">
Name: <input type="text" name="name" value="Enter your name here" onfocus="this.value=''"><br>
Email address: <input type="text" name="email" value="Enter your email address here" onfocus="this.value=''"><br>
Desired Subdomain: <input type="text" name="subdomain" value="Enter your desired subdomain here" onfocus="this.value=''">.izcool.com<br>
Why you want the subdomain: <input type="text" name="why" value="Enter why you want the subdomain here" onfocus="this.value=''"><br>
What to write in subdomain:<br><textarea name="content"></textarea><br>
What image to put in subdomain: <input type="text" name="image" value="Enter the url of the image here" onfocus="this.value=''"><br>
<input name="submit" type="submit" value="Submit">
</form>



<form name="general" action="generalprocess.php" method="post">
Name: <input type="text" name="name" value="Enter your name here" onfocus="this.value=''"><br>
Email Address: <input type="text" name="email" value="Enter your email address here" onfocus="this.value=''"><br>
Category: <select name="category">
<option value="generalsite">General Site</option>
<option value="generalforum">General Forum</option>
<option value="errors">Errors & Problems</option>
<option value="ads">Advertisements</option>
<option value="jobs">Job Applications</option>
</select><br>
Information:<br><textarea name="info"></textarea>
<input type="submit" name="submit" value="Submit">
</form>


That's the html, you just need the php now. I would suggest inserting it into a mySQL database rather than sending it by email, but it's up to you.

EDIT: Jack's reply is better than mine. :)

Jackboy
16-11-2008, 01:54 PM
First form


<?
if (!$_POST){
echo "<font face=\"tahoma\" size=\"1\">
<form method=\"POST\" action=\"$PHP_SELF\">

<b>Name:</b> <input type=\"text\" size=\"40\" name=\"name\"><br>

<b>Email Address:</b> <input type=\"text\" size=\"40\" name=\"email\"><br>

<b>Desired SubDomain:</b> <input type=\"text\" size=\"40\" name=\"subdomain\">.izcool.com<br>

<b>Why you want the SubDomain:</b> <input type=\"text\" size=\"40\" name=\"why\"><br>

<b>What to write in subdomain:</b> <input type=\"text\" size=\"40\" name=\"what\"><br>

<b>What image to put in subdomain:</b> <input type=\"text\" size=\"40\" name=\"image\" value=\"http://\"><br>
(<i>Upload you're file using <a href=\"http://www.tehupload.com/index.php\" target=\"blank\">TehUpload</a></i>)<br><br>

<input type=\"submit\" value=\"Apply for Subdomain\">

</form>
";
}else{

$name = strip_tags($_POST[name]);
$email = strip_tags($_POST[email]);
$subdomain = strip_tags($_POST[subdomain]);
$why = strip_tags($_POST[why]);
$what = strip_tags($_POST[what]);
$image = strip_tags($_POST[image]);

$SenderName = "IzCool System"; // From Name, if you get me ryan?

$SenderEmail = "[email protected]"; // From EMmail

$RecieverEmail = "[email protected]"; // THE EMAIL ITS MAILED to ;)

$Message = "
You have recieved a subdomain request.<br><br>
<b>Name:</b> $name<br>
<b>Email:</b> $email<br>
<b>Subdomain wanted:</b> $subdomain<br>
<b>Why they want it:</b> $why<br>
<b>What they want on their subdomain:</b> $what<br>
<b>Image they want on it:</b> $image<br><br>
<font size=\"1\">Coded by Jack Ellis</font>
"; // Email text ;)

$Subject = "IzCool SubDomain Request"; // Subject

$Headers = 'MIME-Version: 1.0' . "\r\n";
$Headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";

$Headers .= "From: ". $SenderName . " <" . $SenderEmail . ">\r\n"; // Your headers, dnt touch ;)

mail($RecieverEmail, $Subject, $Message, $Headers); // The actual mail yeh, not that kind of mail
echo "Message Sent";
}
?>Demo : http://imhabbo.com/test.php
Not amazing coding but i just did a quick chuckup.

2nd form


<?
if (!$_POST){
echo "<font face=\"tahoma\" size=\"1\">
<form method=\"POST\" action=\"$PHP_SELF\">

<b>Name:</b> <input type=\"text\" size=\"40\" name=\"name\"><br>

<b>Email Address:</b> <input type=\"text\" size=\"40\" name=\"email\"><br>

<b>Category:</b> <select name=\"category\">
<option name=\"General Site\">General Site</option>
<option name=\"General Forum\">General Forum</option>
<option name=\"Errors & Problems\">Errors & Problems</option>
<option name=\"Advertisements\">Advertisements</option>
<option name=\"Job Applications\">Job Applications</option></select><br>
<b>Information:</b><br>
<textarea name=\"information\" cols=\"20\" rows=\"5\"></textarea><br>




<input type=\"submit\" value=\"Send\">

</form>
";
}else{

$name = strip_tags($_POST[name]);
$email = strip_tags($_POST[email]);
$category = strip_tags($_POST[category]);
$information = strip_tags($_POST[information]);

$SenderName = "IzCool System"; // From Name, if you get me ryan?

$SenderEmail = "[email protected]"; // From EMmail

$RecieverEmail = "[email protected]"; // THE EMAIL ITS MAILED to ;)

$Message = "
<b>Name:</b> $name<br>
<b>Email:</b> $email<br>
<b>Category:</b> $category<br>
<b>Information:</b><br>
$information<br><br>
<font size=\"1\">Coded by Jack Ellis</font>
"; // Email text ;)

$Subject = "IzCool Contact Form"; // Subject

$Headers = 'MIME-Version: 1.0' . "\r\n";
$Headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";

$Headers .= "From: ". $SenderName . " <" . $SenderEmail . ">\r\n"; // Your headers, dnt touch ;)

mail($RecieverEmail, $Subject, $Message, $Headers); // The actual mail yeh, not that kind of mail
echo "Message Sent";
}
?>

Demo : http://imhabbo.com/test2.php
Not amazing coding but i just did a quick chuckup.

All works, if you wanna pay me back i would prefer paypal or w/e but i dm

email is [email protected]

ENJOY

HabbDance
16-11-2008, 01:55 PM
<form name="subdomain" action="subdomainprocess.php" method="post">
Name: <input type="text" name="name" value="Enter your name here" onfocus="this.value=''"><br>
Email address: <input type="text" name="email" value="Enter your email address here" onfocus="this.value=''"><br>
Desired Subdomain: <input type="text" name="subdomain" value="Enter your desired subdomain here" onfocus="this.value=''"><br>
Why you want the subdomain: <input type="text" name="why" value="Enter why you want the subdomain here" onfocus="this.value=''"><br>
What to write in subdomain:<br><textarea name="content"></textarea><br>
What image to put in subdomain: <input type="text" name="image" value="Enter the url of the image here" onfocus="this.value=''"><br>
<input name="submit" type="submit" value="Submit">
</form>


<form name="general" action="generalprocess.php" method="post">
Name: <input type="text" name="name" value="Enter your name here" onfocus="this.value=''"><br>
Email Address: <input type="text" name="email" value="Enter your email address here" onfocus="this.value=''"><br>
Category: <select name="category">
<option value="generalsite">General Site</option>
<option value="generalforum">General Forum</option>
<option value="errors">Errors & Problems</option>
<option value="ads">Advertisements</option>
<option value="jobs">Job Applications</option>
</select><br>
Information:<br><textarea name="info"></textarea>
<input type="submit" name="submit" value="Submit">
</form>
That's the html, you just need the php now. I would suggest inserting it into a mySQL database rather than sending it by email, but it's up to you.
If I'm not mistaken the php is rather easy?
Something that displays the person's answers with like $variable or something? :S could be wrong though, not good at php

RyanDOT
16-11-2008, 02:01 PM
<form name="subdomain" action="subdomainprocess.php" method="post">
Name: <input type="text" name="name" value="Enter your name here" onfocus="this.value=''"><br>
Email address: <input type="text" name="email" value="Enter your email address here" onfocus="this.value=''"><br>
Desired Subdomain: <input type="text" name="subdomain" value="Enter your desired subdomain here" onfocus="this.value=''">.izcool.com<br>
Why you want the subdomain: <input type="text" name="why" value="Enter why you want the subdomain here" onfocus="this.value=''"><br>
What to write in subdomain:<br><textarea name="content"></textarea><br>
What image to put in subdomain: <input type="text" name="image" value="Enter the url of the image here" onfocus="this.value=''"><br>
<input name="submit" type="submit" value="Submit">
</form>


<form name="general" action="generalprocess.php" method="post">
Name: <input type="text" name="name" value="Enter your name here" onfocus="this.value=''"><br>
Email Address: <input type="text" name="email" value="Enter your email address here" onfocus="this.value=''"><br>
Category: <select name="category">
<option value="generalsite">General Site</option>
<option value="generalforum">General Forum</option>
<option value="errors">Errors & Problems</option>
<option value="ads">Advertisements</option>
<option value="jobs">Job Applications</option>
</select><br>
Information:<br><textarea name="info"></textarea>
<input type="submit" name="submit" value="Submit">
</form>
That's the html, you just need the php now. I would suggest inserting it into a mySQL database rather than sending it by email, but it's up to you.

EDIT: Jack's reply is better than mine. :)


First form


<?
if (!$_POST){
echo "<font face=\"tahoma\" size=\"1\">
<form method=\"POST\" action=\"$PHP_SELF\">

<b>Name:</b> <input type=\"text\" size=\"40\" name=\"name\"><br>

<b>Email Address:</b> <input type=\"text\" size=\"40\" name=\"email\"><br>

<b>Desired SubDomain:</b> <input type=\"text\" size=\"40\" name=\"subdomain\">.izcool.com<br>

<b>Why you want the SubDomain:</b> <input type=\"text\" size=\"40\" name=\"why\"><br>

<b>What to write in subdomain:</b> <input type=\"text\" size=\"40\" name=\"what\"><br>

<b>What image to put in subdomain:</b> <input type=\"text\" size=\"40\" name=\"image\" value=\"http://\"><br>
(<i>Upload you're file using <a href=\"http://www.tehupload.com/index.php\" target=\"blank\">TehUpload</a></i>)<br><br>

<input type=\"submit\" value=\"Apply for Subdomain\">

</form>
";
}else{

$name = strip_tags($_POST[name]);
$email = strip_tags($_POST[email]);
$subdomain = strip_tags($_POST[subdomain]);
$why = strip_tags($_POST[why]);
$what = strip_tags($_POST[what]);
$image = strip_tags($_POST[image]);

$SenderName = "IzCool System"; // From Name, if you get me ryan?

$SenderEmail = "[email protected]"; // From EMmail

$RecieverEmail = "[email protected]"; // THE EMAIL ITS MAILED to ;)

$Message = "
You have recieved a subdomain request.<br><br>
<b>Name:</b> $name<br>
<b>Email:</b> $email<br>
<b>Subdomain wanted:</b> $subdomain<br>
<b>Why they want it:</b> $why<br>
<b>What they want on their subdomain:</b> $what<br>
<b>Image they want on it:</b> $image<br><br>
<font size=\"1\">Coded by Jack Ellis</font>
"; // Email text ;)

$Subject = "IzCool SubDomain Request"; // Subject

$Headers = 'MIME-Version: 1.0' . "\r\n";
$Headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";

$Headers .= "From: ". $SenderName . " <" . $SenderEmail . ">\r\n"; // Your headers, dnt touch ;)

mail($RecieverEmail, $Subject, $Message, $Headers); // The actual mail yeh, not that kind of mail
echo "Message Sent";
}
?>Demo : http://imhabbo.com/test.php
Not amazing coding but i just did a quick chuckup.

2nd form


<?
if (!$_POST){
echo "<font face=\"tahoma\" size=\"1\">
<form method=\"POST\" action=\"$PHP_SELF\">

<b>Name:</b> <input type=\"text\" size=\"40\" name=\"name\"><br>

<b>Email Address:</b> <input type=\"text\" size=\"40\" name=\"email\"><br>

<b>Category:</b> <select name=\"category\">
<option name=\"General Site\">General Site</option>
<option name=\"General Forum\">General Forum</option>
<option name=\"Errors & Problems\">Errors & Problems</option>
<option name=\"Advertisements\">Advertisements</option>
<option name=\"Job Applications\">Job Applications</option></select><br>
<b>Information:</b><br>
<textarea name=\"information\" cols=\"20\" rows=\"5\"></textarea><br>




<input type=\"submit\" value=\"Send\">

</form>
";
}else{

$name = strip_tags($_POST[name]);
$email = strip_tags($_POST[email]);
$category = strip_tags($_POST[category]);
$information = strip_tags($_POST[information]);

$SenderName = "IzCool System"; // From Name, if you get me ryan?

$SenderEmail = "[email protected]"; // From EMmail

$RecieverEmail = "[email protected]"; // THE EMAIL ITS MAILED to ;)

$Message = "
<b>Name:</b> $name<br>
<b>Email:</b> $email<br>
<b>Category:</b> $category<br>
<b>Information:</b><br>
$information<br><br>
<font size=\"1\">Coded by Jack Ellis</font>
"; // Email text ;)

$Subject = "IzCool Contact Form"; // Subject

$Headers = 'MIME-Version: 1.0' . "\r\n";
$Headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";

$Headers .= "From: ". $SenderName . " <" . $SenderEmail . ">\r\n"; // Your headers, dnt touch ;)

mail($RecieverEmail, $Subject, $Message, $Headers); // The actual mail yeh, not that kind of mail
echo "Message Sent";
}
?>

Demo : http://imhabbo.com/test2.php
Not amazing coding but i just did a quick chuckup.

All works, if you wanna pay me back i would prefer paypal or w/e but i dm

email is [email protected]

ENJOY


Jhxn, forgot to say that i wanted it in PHP.
Jack, im saving up on my PayPal.
If you want VIP, just reply back...

+Rep to both if i can.
I use your's Jack!

Jackboy
16-11-2008, 02:03 PM
Jhxn, forgot to say that i wanted it in PHP.
Jack, im saving up on my PayPal.
If you want VIP, just reply back...

+Rep to both if i can.
I use your's Jack!

Yeh vip will be boss, if you're buying VIP then black pls

RyanDOT
16-11-2008, 02:07 PM
Yeh vip will be boss, if you're buying VIP then black pls

I got back-up VIP, so i tell brandon to move a month's VIP to you if possible...
If not, i most probs pay via PP.

Jackboy
16-11-2008, 02:08 PM
I got back-up VIP, so i tell brandon to move a month's VIP to you if possible...
If not, i most probs pay via PP.

Okay thanks, if you're gonna pay with paypal can you send me cash that you would've spent instead so i can buy CHF vip pls ;) thanks

Nli.
16-11-2008, 02:33 PM
First form


<?
if (!$_POST){
echo "<font face=\"tahoma\" size=\"1\">
<form method=\"POST\" action=\"$PHP_SELF\">

<b>Name:</b> <input type=\"text\" size=\"40\" name=\"name\"><br>

<b>Email Address:</b> <input type=\"text\" size=\"40\" name=\"email\"><br>

<b>Desired SubDomain:</b> <input type=\"text\" size=\"40\" name=\"subdomain\">.izcool.com<br>

<b>Why you want the SubDomain:</b> <input type=\"text\" size=\"40\" name=\"why\"><br>

<b>What to write in subdomain:</b> <input type=\"text\" size=\"40\" name=\"what\"><br>

<b>What image to put in subdomain:</b> <input type=\"text\" size=\"40\" name=\"image\" value=\"http://\"><br>
(<i>Upload you're file using <a href=\"http://www.tehupload.com/index.php\" target=\"blank\">TehUpload</a></i>)<br><br>

<input type=\"submit\" value=\"Apply for Subdomain\">

</form>
";
}else{

$name = strip_tags($_POST[name]);
$email = strip_tags($_POST[email]);
$subdomain = strip_tags($_POST[subdomain]);
$why = strip_tags($_POST[why]);
$what = strip_tags($_POST[what]);
$image = strip_tags($_POST[image]);

$SenderName = "IzCool System"; // From Name, if you get me ryan?

$SenderEmail = "[email protected]"; // From EMmail

$RecieverEmail = "[email protected]"; // THE EMAIL ITS MAILED to ;)

$Message = "
You have recieved a subdomain request.<br><br>
<b>Name:</b> $name<br>
<b>Email:</b> $email<br>
<b>Subdomain wanted:</b> $subdomain<br>
<b>Why they want it:</b> $why<br>
<b>What they want on their subdomain:</b> $what<br>
<b>Image they want on it:</b> $image<br><br>
<font size=\"1\">Coded by Jack Ellis</font>
"; // Email text ;)

$Subject = "IzCool SubDomain Request"; // Subject

$Headers = 'MIME-Version: 1.0' . "\r\n";
$Headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";

$Headers .= "From: ". $SenderName . " <" . $SenderEmail . ">\r\n"; // Your headers, dnt touch ;)

mail($RecieverEmail, $Subject, $Message, $Headers); // The actual mail yeh, not that kind of mail
echo "Message Sent";
}
?>Demo : http://imhabbo.com/test.php
Not amazing coding but i just did a quick chuckup.

2nd form


<?
if (!$_POST){
echo "<font face=\"tahoma\" size=\"1\">
<form method=\"POST\" action=\"$PHP_SELF\">

<b>Name:</b> <input type=\"text\" size=\"40\" name=\"name\"><br>

<b>Email Address:</b> <input type=\"text\" size=\"40\" name=\"email\"><br>

<b>Category:</b> <select name=\"category\">
<option name=\"General Site\">General Site</option>
<option name=\"General Forum\">General Forum</option>
<option name=\"Errors & Problems\">Errors & Problems</option>
<option name=\"Advertisements\">Advertisements</option>
<option name=\"Job Applications\">Job Applications</option></select><br>
<b>Information:</b><br>
<textarea name=\"information\" cols=\"20\" rows=\"5\"></textarea><br>




<input type=\"submit\" value=\"Send\">

</form>
";
}else{

$name = strip_tags($_POST[name]);
$email = strip_tags($_POST[email]);
$category = strip_tags($_POST[category]);
$information = strip_tags($_POST[information]);

$SenderName = "IzCool System"; // From Name, if you get me ryan?

$SenderEmail = "[email protected]"; // From EMmail

$RecieverEmail = "[email protected]"; // THE EMAIL ITS MAILED to ;)

$Message = "
<b>Name:</b> $name<br>
<b>Email:</b> $email<br>
<b>Category:</b> $category<br>
<b>Information:</b><br>
$information<br><br>
<font size=\"1\">Coded by Jack Ellis</font>
"; // Email text ;)

$Subject = "IzCool Contact Form"; // Subject

$Headers = 'MIME-Version: 1.0' . "\r\n";
$Headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";

$Headers .= "From: ". $SenderName . " <" . $SenderEmail . ">\r\n"; // Your headers, dnt touch ;)

mail($RecieverEmail, $Subject, $Message, $Headers); // The actual mail yeh, not that kind of mail
echo "Message Sent";
}
?>

Demo : http://imhabbo.com/test2.php
Not amazing coding but i just did a quick chuckup.

All works, if you wanna pay me back i would prefer paypal or w/e but i dm

email is [email protected]

ENJOY
Why pay when you could get one from some where for free? I've saw forms on here before, Just search contact us form, and change it.

RyanDOT
16-11-2008, 02:36 PM
Why pay when you could get one from some where for free? I've saw forms on here before, Just search contact us form, and change it.

Im paying little. If i can give him VIP, cos i got spare VIP which i don't want no-more...

Jackboy
16-11-2008, 02:42 PM
Why pay when you could get one from some where for free? I've saw forms on here before, Just search contact us form, and change it.

Okay, find the one i have ripped then.

I have a reputation. I doubt anyone on here has even heard of you? I certainly haven't

wazup999
16-11-2008, 04:33 PM
He didn't say you ripped it he just said why didn't ryan get 1 for free and change it to his liking also known as ripping.

Oh god.
waz

L?KE
16-11-2008, 04:36 PM
Okay, find the one i have ripped then.

I have a reputation. I doubt anyone on here has even heard of you? I certainly haven't

Didn't realise, sorry god.

And he didn't accuse you of ripping it, he meant find a free one online :P

Jackboy
16-11-2008, 04:48 PM
I read it completely wrong...

I'm really sorry.

I think i was reading 2 posts at the same time and got confused :(

L?KE
16-11-2008, 05:10 PM
Lol don't matter. Least you weren't stubborn about it :P

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