Jump to content


I need a custom email form ASAP


10 replies to this topic

#1 _yo_wasup_

    Young Padawan

  • Members
  • Pip
  • 8 posts

Posted 01 July 2005 - 02:16 AM

Alright, I already have this email form, I don't know if theres another way of doing it, but it opens Outlook Express to email it. I was wondering if you could use like a pop3 server or something and have it come to you through ONE email. Heres my email form:


<form action="mailto:EMAIL@EMAIL.com?subject=SUBJECT" method="post" enctype="text/plain">
<table><tr><td>
Name: <INPUT NAME="Name" TYPE="text" VALUE="" SIZE=30 MAXLENGTH=35><BR><BR>
E-Mail: <INPUT NAME="Name" TYPE="text" VALUE="" SIZE=30 MAXLENGTH=35><BR><BR>
Games Played:<BR> <INPUT  NAME="Games Played" TYPE="checkbox" VALUE="Counter Strike">Counter Strike<BR>
 <INPUT  NAME="Games Played" TYPE="checkbox" VALUE="Jedi Knight">Jedi Knight<BR>
 <INPUT  NAME="Games Played" TYPE="checkbox" VALUE="Age Of Empires">Age Of Empires<BR>
 <INPUT  NAME="Games Played" TYPE="checkbox" VALUE="Star Craft">Star Craft
<br>

Others: <INPUT NAME="Others" TYPE="text" SIZE=30 MAXLENGTH=35 align="center"><BR><BR>
Specialties: <INPUT NAME="Specialties" TYPE="text" VALUE="For ex.   HTML , PHP , Cogging , Game Making , etc." SIZE=30 MAXLENGTH=35 align=center><BR>
Anything Else:<BR><textarea rows=12 cols=27></textarea>
</td></tr>
<tr><td align=center>
<INPUT type="image" src=images/apply.gif value="Apply" style="color: #FFFFFF; background-color: #5c1111">
</td></tr></table>
</FORM>


It is a tryout slip that people fill out to request a tryout for our clan. I need one that does a better job and that I can modify to change choices.

If I could add anything else, I need about 5 little checkboxes at the bottem that HAVE to be selected in order for the form to be sent, each of them saying something different. If this is possible, i'll give my life to anyone. Thx.

#2 funkysoul

    The Funky Stuff

  • Publishing Betazoids
  • PipPipPipPip
  • 2,307 posts
  • Gender:Male
  • Location:Zurich, Switzerland
  • Interests:Music: HIM, HIM, HIM, Cafe del Mar, Linkin Park, Fort Minor, Coldplay, Eric Jordan<br />Sports: Snowboarding, KiteSurfing, Extreme Sports<br />Computer: Flash, After Effects, Actionscript

Posted 01 July 2005 - 03:35 AM

instead of using a mailto in the form action, use a php/asp script that collects all the data for you and sends it to your email adress...

Search on P2L for "php email"

#3 _yo_wasup_

    Young Padawan

  • Members
  • Pip
  • 8 posts

Posted 09 July 2005 - 06:29 PM

<form method="post" action="send.php"> 

<table border="0" celpadding="0" cellspacing="0">
<tr>
<td>
Name:
</td>
<td>
<input type="text" name="name" value="" size="32" maxlength="40">
</td></tr><tr><td>

E-mail:

</td><td>

<input type="text" name="email" value="" size="32" maxlength="40">

</td></tr><tr><tr><td>

Comments:

</td><td>
<textarea rows="4" cols="24" name="comments" maxlength="300"></textarea>
</td></tr></table>

<br /><br /><input type="submit" value="Send"></td></tr>
</form>


As you can see I now have Name, Email, and Comments on my form.

I would like to add other ones, how do i do that in my send.php:


<?php

echo "Thank you for taking time to submit an application for _yo_. We will be with you shortly.";

$email = "yowasup_@hotmail.com";
$subject = "__yo_ Application __";
$name = $_POST['Tryout!'];
$commentemail = $_POST['email'];
$comments = $_POST['comments'];

mail("$email", "$subject", "$name \n\n $commentemail \n\n $comments");

?>


Thanks for your help everyone. I just got confused on the $email, exc. can you put like $games?

#4 funkysoul

    The Funky Stuff

  • Publishing Betazoids
  • PipPipPipPip
  • 2,307 posts
  • Gender:Male
  • Location:Zurich, Switzerland
  • Interests:Music: HIM, HIM, HIM, Cafe del Mar, Linkin Park, Fort Minor, Coldplay, Eric Jordan<br />Sports: Snowboarding, KiteSurfing, Extreme Sports<br />Computer: Flash, After Effects, Actionscript

Posted 10 July 2005 - 09:38 AM

You can put whatever you want.
You just have to give every new inputfield an unique name, like you did with the email and comments..

And for the PHP you just need to add the new fieldname.
$yourField1 = $_POST['yourField1'];

Cheers

#5 _yo_wasup_

    Young Padawan

  • Members
  • Pip
  • 8 posts

Posted 10 July 2005 - 08:12 PM

THANKS is there a way I can add like a checkbox to PHP?

like

<input type="checkbox" name="subject" value="1" checked="1"/>
Subject

or something




I need that to appear on the email that they send. (whichever ones they click)

#6 _yo_wasup_

    Young Padawan

  • Members
  • Pip
  • 8 posts

Posted 10 July 2005 - 08:47 PM

wow ok i tested an email to see if my new method worked, it didn't. only the email and the comments worked, and the comments didn't say Comments: (what i typed) it just had what they typed spaced below. heres what i edited, tell me what i did wrong...

send.php
<?php

echo "Thank you for taking time to submit an application for _yo_. We will be with you shortly.";

$email = "yowasup_@hotmail.com";
$subject = "__yo_ Application __";
$firstname = $_POST['firstname'];
$gamename = $_POST['gamename'];
$email = $_POST['email'];
$age = $_POST['age'];
$stateorprovince = $_POST['stateorprovince'];
$comments = $_POST['comments'];

mail("$email", "$subject", "$firstname \n\n $gamename \n\n $email \n\n $age \n\n $stateorprovince \n\n $comments");

?>



form.htm
<form method="post" action="send.php"> 

<table border="0" celpadding="0" cellspacing="0">
<tr>
<td>
First Name:</td><td><input type="text" name="name" value="" size="32" maxlength="40"></td></tr><tr><td>

Game Name:</td><td><input type="text" name="name" value="" size="32" maxlength="40"></td></tr><tr><td>

E-mail:</td><td><input type="text" name="email" value="" size="32" maxlength="40"></td></tr><tr><tr><td>

Age:</td><td><input type="text" name="name" value="" size="32" maxlength="40"></td></tr><tr><td>

State / Province:</td><td><input type="text" name="name" value="" size="32" maxlength="40"></td></tr><tr><td>

Comments:</td><td><textarea rows="4" cols="24" name="comments" maxlength="300"></textarea></td></tr></table>

<br /><br /><input type="submit" value="Send"><form>
<input type="button" name="Exit" value="Fuck Off" onClick="javascript:exit()">
</form>

<script>
function exit(){
close();
}
</script></td></tr>
</form>


#7 Jaymz

    Retired P2L Staff

  • Members
  • PipPipPipPip
  • 4,104 posts

Posted 10 July 2005 - 08:50 PM

echo "Thank you for taking time to submit an application for _yo_. We will be with you shortly.";

$email = "yowasup_@hotmail.com";
$subject = "__yo_ Application __";
$firstname = $_POST['firstname'];
$gamename = $_POST['gamename'];
$email = $_POST['email'];
$age = $_POST['age'];
$stateorprovince = $_POST['stateorprovince'];
$comments = $_POST['comments'];

mail("$email", "$subject", "First Name: $firstname \n\n Game Name: $gamename \n\n E-mail: $email \n\n Age: $age \n\n State/Prov: $stateorprovince \n\n Comments: $comments");

?>

You forgot to put the text in, you just had the variables ;)

#8 funkysoul

    The Funky Stuff

  • Publishing Betazoids
  • PipPipPipPip
  • 2,307 posts
  • Gender:Male
  • Location:Zurich, Switzerland
  • Interests:Music: HIM, HIM, HIM, Cafe del Mar, Linkin Park, Fort Minor, Coldplay, Eric Jordan<br />Sports: Snowboarding, KiteSurfing, Extreme Sports<br />Computer: Flash, After Effects, Actionscript

Posted 11 July 2005 - 01:37 AM

and your html form is full with "name" tags, give each one a new name.

#9 _yo_wasup_

    Young Padawan

  • Members
  • Pip
  • 8 posts

Posted 11 July 2005 - 02:23 AM

I updated my PHP script to yours Jaymz and now the form doesn't send. It goes to the white echo screen and says this:


echo "Thank you for taking time to submit an application for _yo_. We will be with you shortly."; $email = "yowasup_@hotmail.com"; $subject = "__yo_ Application __"; $firstname = $_POST['firstname']; $gamename = $_POST['gamename']; $email = $_POST['email']; $age = $_POST['age']; $stateorprovince = $_POST['stateorprovince']; $comments = $_POST['comments']; mail("$email", "$subject", "First Name: $firstname \n\n Game Name: $gamename \n\n E-mail: $email \n\n Age: $age \n\n State/Prov: $stateorprovince \n\n Comments: $comments"); ?>



Funkysoul, what can I name the tags?

#10 funkysoul

    The Funky Stuff

  • Publishing Betazoids
  • PipPipPipPip
  • 2,307 posts
  • Gender:Male
  • Location:Zurich, Switzerland
  • Interests:Music: HIM, HIM, HIM, Cafe del Mar, Linkin Park, Fort Minor, Coldplay, Eric Jordan<br />Sports: Snowboarding, KiteSurfing, Extreme Sports<br />Computer: Flash, After Effects, Actionscript

Posted 11 July 2005 - 06:33 AM

Like this
<form method="post" action="send.php"> 

<table border="0" celpadding="0" cellspacing="0">
<tr>
<td>
First Name:</td><td><input type="text" name="name" value="" size="32" maxlength="40"></td></tr><tr><td>

Game Name:</td><td><input type="text" name="gamename" value="" size="32" maxlength="40"></td></tr><tr><td>

E-mail:</td><td><input type="text" name="email" value="" size="32" maxlength="40"></td></tr><tr><tr><td>

Age:</td><td><input type="text" name="age" value="" size="32" maxlength="40"></td></tr><tr><td>

State / Province:</td><td><input type="text" name="state" value="" size="32" maxlength="40"></td></tr><tr><td>

Comments:</td><td><textarea rows="4" cols="24" name="comments" maxlength="300"></textarea></td></tr></table>

<br /><br /><input type="submit" value="Send"><form>
<input type="button" name="Exit" value="Fuck Off" onClick="javascript:exit()">
</form>

<script>
function exit(){
close();
}
</script></td></tr>
</form>


#11 _yo_wasup_

    Young Padawan

  • Members
  • Pip
  • 8 posts

Posted 11 July 2005 - 07:32 PM

Alright thx, but whats wrong with my PHP code now?



echo "Thank you for taking time to submit an application for _yo_. We will be with you shortly.";

$email = "yowasup_@hotmail.com";
$subject = "__yo_ Application __";
$firstname = $_POST['firstname'];
$gamename = $_POST['gamename'];
$email = $_POST['email'];
$age = $_POST['age'];
$stateorprovince = $_POST['stateorprovince'];
$comments = $_POST['comments'];

mail("$email", "$subject", "First Name: $firstname \n\n Game Name: $gamename \n\n E-mail: $email \n\n Age: $age \n\n State/Prov: $stateorprovince \n\n Comments: $comments");

?>






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users