...

View Full Version : Join FORM



py2o3434
05-24-2004, 09:25 PM
Hi,
I have been trying to set up a form for people who want to join my gaming clan. I have set one up : http://duiteam.nuclearfallout.net/join.php

The problem i have been having is that it doesnt send to my email, and if it does its a blank email. Can someone help me? Any help would be GREAT! THANKS!

bradyj
05-24-2004, 09:31 PM
Can you post up your PHP code for that form?

bradyj
05-24-2004, 09:40 PM
Try this as well, name it as whatever your external php is:


<?php
$name= $_POST['name'];
$csname= $_POST['cs_name'];
$age= $_POST['age'];
$experience= $_POST['experience'];
$email= $_POST['email'];
$reason= $_POST['reason'];

$body = "
Name: $name
CS Name: $csname
Experience: $experience
E-mail Address: $email
Reason to Join: $reason

";

if (!isset($email) || !isset($name)) {
header("Location: http://www.yourwebsite.com/error.php ");
}
elseif (empty($email) || empty($name)) {
header("Location: http://www.yourwebsite.com/error.php ");
}
else {
mail("email@yourwebsite.com","From: yourwebsite.com visitor",$body);
header("Location: http://www.yourwebsite.com/thankyou.php ");
}
?>

Then in the 'name' of your corresponding tag that fits it put either:
name
cs_name
age
experience
email
reason

py2o3434
05-25-2004, 05:10 AM
<html>
<head>
<title>Join [=DS=] Clan</title>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1">
<meta http-equiv="imagetoolbar" content="no">
<meta http-equiv="Page-Enter" content="blendTrans(Duration=0.5)">
<meta http-equiv="Page-Exit" content="blendTrans(Duration=0.5)">
<script language="JavaScript1.2">



//Disable select-text script (IE4+, NS6+)- By Andy Scott

//Exclusive permission granted to Dynamic Drive to feature script

//Visit http://www.dynamicdrive.com for this script



function disableselect(e){

return false

}



function reEnable(){

return true

}



//if IE4+

document.onselectstart=new Function ("return false")



//if NS6

if (window.sidebar){

document.onmousedown=disableselect

document.onclick=reEnable

}

</script>
<script language="JavaScript">

<!--



//Disable right click script III- By Renigade (renigade@mediaone.net)

//For full source code, visit http://www.dynamicdrive.com



var message="";

///////////////////////////////////

function clickIE() {if (document.all) {(message);return false;}}

function clickNS(e) {if

(document.layers||(document.getElementById&&!document.all)) {

if (e.which==2||e.which==3) {(message);return false;}}}

if (document.layers)

{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}

else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}

// -->

</script>
<style type="text/css">

<!--

BODY {

scrollbar-face-color:#E7E7E7;

scrollbar-highlight-color:#E7E7E7;

scrollbar-3dlight-color:#E7E7E7;

scrollbar-darkshadow-color:#E7E7E7;

scrollbar-shadow-color:#E7E7E7;

scrollbar-arrow-color:#8B6C7D3;

scrollbar-track-color:#E7E7E7;

}

-->

</style>
<script src="FADE.JS" language="Javascript"></script>
<style>

<!--

A:link

{

FONT-FACE: arial;

FONT-SIZE: 10;

FONT-WEIGHT: bold;

color: #959292;

text-decoration: none

}

A:visited

{

FONT-FACE: arial;

FONT-SIZE: 10;

FONT-WEIGHT: bold;

color: #959292;

text-decoration: none

}

A:hover

{

color: #c6c6c6;

text-decoration: none

}

-->

</style>
<style type="text/css">

@import url(join.css);



table.main

</style>
<style type="text/css">body,html{background-color:transparent;}</style>
</head>
<body topmargin="0" marginwidth="0" marginheight="0">
<form method="post" target="_self"
action="http://duiteam.nuclearfallout.net/formmail/join.php">
<div align="center">
<table width="100%" align="center" border="0" class="mainfont">
<tbody>
<tr>
<td> <br>
<div align="justify"> <font face="arial" size="1"
color="#959292"><b>
<center>All of the information requested is important and you
must fill out all of the below fields to be considered.</center>
</b></font></div>
<br>
<div align="center"><font face="Tahoma" size="1" color="#959292">
</font><input name="1" type="hidden" value="Name:"><input
name="2" type="hidden" value="CS Name:"><input name="3" type="hidden"
value="Age:"><input name="4" type="hidden" value="Experience:"><input
name="4" type="hidden" value="E-mail Address:"><input name="9"
type="hidden" value="Reason to Join:">
<table align="center" class="mainfont">
<tbody>
<tr>
<td>
<p> <font face="Tahoma" size="1" color="#959292">Name:</font></p>
</td>
<td> <input name="s1" class="formstyle2" size="25"
type="text" id="inputfield" value="" maxlength="80"></td>
</tr>
<tr>
<td>
<p> <font face="Tahoma" size="1" color="#959292">CS Name:</font></p>
</td>
<td> <input name="s2" class="formstyle2" size="25"
type="text" id="inputfield" value="" maxlength="80"></td>
</tr>
<tr>
<td>
<p> <font face="Tahoma" size="1" color="#959292">Age:</font></p>
</td>
<td> <input name="s3" class="formstyle2" size="25"
type="text" id="inputfield" value="" maxlength="80"></td>
</tr>
<tr>
<td>
<p> <font face="Tahoma" size="1" color="#959292">Experience:</font></p>
</td>
<td> <input name="s4" class="formstyle2" size="25"
type="text" id="inputfield" value="" maxlength="80"></td>
</tr>
<tr>
<td>
<p> <font face="Tahoma" size="1" color="#959292">E-mail
Address:</font></p>
</td>
<td> <input name="s5" class="formstyle2" size="25"
type="text" id="inputfield" value="" maxlength="80"></td>
</tr>
<tr>
<td valign="left">
<p> </p>
<p> </p>
<p> <font face="Tahoma" size="1" color="#959292">Reason
to Join:</font></p>
</td>
<td> <textarea name="s6" id="inputfield" cols="30"
rows="3" wrap="virtual"></textarea></td>
</tr>
<tr>
<td colspan="2" align="right">
<div align="right"><input name="item8" type="submit"
value="Join Now!" id="button">&nbsp;<input name="item9" type="reset"
value="Reset" id="button"> </div>
</td>
</tr>
</tbody>
</table>
</div>
</td>
</tr>
<tr>
<td> <br>
</td>
</tr>
</tbody>
</table>
</div>
</form>
</body>
</html>


Is there an easy PHP editor i can download, caus enow all i have is html

bradyj
05-25-2004, 05:19 AM
html editor should do the php just fine, but here, all you need to do is this:
1. this tag to what I'm writing now:


<form method="post" target="_self"
action="http://duiteam.nuclearfallout.net/formmail/mailform.php">


Save that php to that location (or another, just change the http, you can change the name to something else instead of mailform). And adjust the php to whatever 'yourwebsite' is and your email address. You should be able to use the same type of editor that edits html. Post if you have more questions, but give it a go and post me a link so I can test it out for you.

bradyj
05-25-2004, 05:26 AM
Here's your updated tbody section (wouldn't it be easier to use css rather than that font tag?):


<tbody>
<tr>
<td>
<p> <font face="Tahoma" size="1" color="#959292">Name:</font></p>
</td>
<td> <input name="name" class="formstyle2" size="25"
type="text" id="inputfield" value="" maxlength="80"></td>
</tr>
<tr>
<td>
<p> <font face="Tahoma" size="1" color="#959292">CS Name:</font></p>
</td>
<td> <input name="cs_name" class="formstyle2" size="25"
type="text" id="inputfield" value="" maxlength="80"></td>
</tr>
<tr>
<td>
<p> <font face="Tahoma" size="1" color="#959292">Age:</font></p>
</td>
<td> <input name="age" class="formstyle2" size="25"
type="text" id="inputfield" value="" maxlength="80"></td>
</tr>
<tr>
<td>
<p> <font face="Tahoma" size="1" color="#959292">Experience:</font></p>
</td>
<td> <input name="experience" class="formstyle2" size="25"
type="text" id="inputfield" value="" maxlength="80"></td>
</tr>
<tr>
<td>
<p> <font face="Tahoma" size="1" color="#959292">E-mail
Address:</font></p>
</td>
<td> <input name="email" class="formstyle2" size="25"
type="text" id="inputfield" value="" maxlength="80"></td>
</tr>
<tr>
<td valign="left">
<p> </p>
<p> </p>
<p> <font face="Tahoma" size="1" color="#959292">Reason
to Join:</font></p>
</td>
<td> <textarea name="reason" id="inputfield" cols="30"
rows="3" wrap="virtual"></textarea></td>
</tr>
<tr>
<td colspan="2" align="right">
<div align="right"><input name="item8" type="submit"
value="Join Now!" id="button">&nbsp;<input name="item9" type="reset"
value="Reset" id="button"> </div>
</td>
</tr>

py2o3434
05-25-2004, 06:10 AM
Where do i put my email?



Here's your updated tbody section (wouldn't it be easier to use css rather than that font tag?):


<tbody>
<tr>
<td>
<p> <font face="Tahoma" size="1" color="#959292">Name:</font></p>
</td>
<td> <input name="name" class="formstyle2" size="25"
type="text" id="inputfield" value="" maxlength="80"></td>
</tr>
<tr>
<td>
<p> <font face="Tahoma" size="1" color="#959292">CS Name:</font></p>
</td>
<td> <input name="cs_name" class="formstyle2" size="25"
type="text" id="inputfield" value="" maxlength="80"></td>
</tr>
<tr>
<td>
<p> <font face="Tahoma" size="1" color="#959292">Age:</font></p>
</td>
<td> <input name="age" class="formstyle2" size="25"
type="text" id="inputfield" value="" maxlength="80"></td>
</tr>
<tr>
<td>
<p> <font face="Tahoma" size="1" color="#959292">Experience:</font></p>
</td>
<td> <input name="experience" class="formstyle2" size="25"
type="text" id="inputfield" value="" maxlength="80"></td>
</tr>
<tr>
<td>
<p> <font face="Tahoma" size="1" color="#959292">E-mail
Address:</font></p>
</td>
<td> <input name="email" class="formstyle2" size="25"
type="text" id="inputfield" value="" maxlength="80"></td>
</tr>
<tr>
<td valign="left">
<p> </p>
<p> </p>
<p> <font face="Tahoma" size="1" color="#959292">Reason
to Join:</font></p>
</td>
<td> <textarea name="reason" id="inputfield" cols="30"
rows="3" wrap="virtual"></textarea></td>
</tr>
<tr>
<td colspan="2" align="right">
<div align="right"><input name="item8" type="submit"
value="Join Now!" id="button">&nbsp;<input name="item9" type="reset"
value="Reset" id="button"> </div>
</td>
</tr>

bradyj
05-25-2004, 04:25 PM
Where do i put my email?

In the php form, look at the fourth line from the bottom of that which says"
mail {"email@yourwebsite.com...

P.S. -- you might want to edit your actual address out of the post, a spam bot could find it:)

py2o3434
05-26-2004, 07:10 AM
bradyj do you think you can edit the whole coding for me fromt he start? :D

bradyj
05-26-2004, 05:38 PM
Alright, but we're doing it my way:):
Copy this is your new contact page:


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>join [=ds=] clan</title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<meta http-equiv="imagetoolbar" content="no">
<meta http-equiv="page-enter" content="blendtrans(duration=0.5)">
<meta http-equiv="page-exit" content="blendtrans(duration=0.5)">
<style type="text/css">
<!--
body {
font-family: arial, helvetica, verdana, sans-serif;
font-size: 11px;
color: #959292;
margin: 0px;
padding: 0px;
}
.buttons {
text-indent: 250px;
}
fieldset {
width: 600px;
padding: 1em;
font-family: arial, helvetica, verdana, sans-serif;
font-size: 1em;
border: 0px;
margin: 20px 0px 0px -300px;
position: absolute;
left: 50%;
}
legend {
font-weight: bold;
padding: 0px 0px 10px 0px;
}
input {
margin: 10px 0px 0px 0px;
}
textarea {
margin: 10px 0px 0px 0px;
}
label {
float:left;
width:25%;
margin-right:0.5em;
padding-top:15px;
text-align:right;
font-family: arial, helvetica, verdana, sans-serif;
font-size: 11px;
}
a:link {
font-face: arial;
font-size: 10;
font-weight: bold;
color: #959292;
text-decoration: none
}
a:visited {
font-face: arial;
font-size: 10;
font-weight: bold;
color: #959292;
text-decoration: none
}
a:hover {
color: #c6c6c6;
text-decoration: none
}
-->
</style>
</head>
<body>
<form action="mailform.php" method="post">
<fieldset>
<legend>All of the information requested is important and you must fill out all of the below fields to be considered.</legend>
<label for="name">Name:</label>
<input type="text" name="name" maxlength="80" size="25">
<br>
<label for="mail">CS Name:</label>
<input type="text" name="cs_name" maxlength="80" size="25">
<br>
<label for="address">Age:</label>
<input type="text" name="age" maxlength="80" size="25">
<br>
<label for="mail">Experience:</label>
<input type="text" name="experience" maxlength="80" size="25">
<br>
<label for="mail">E-mail address:</label>
<input type="text" name="email" maxlength="80" size="25">
<br>
<label for="mail">Reason to join:</label>
<textarea name="reason" cols="30" rows="3" wrap="virtual">type here...</textarea>
<br>
<div class="buttons">
<input name="item8" type="submit" value="Join Now!" id="button">&nbsp;
<input name="item9" type="reset" value="Reset" id="button">
</div>
</fieldset>
</form>
</body>
</html>

I stripped out the javascript only because I didn't need it and I didn't know what it was for, you can put it back in if you'd like.

As for your php form, I need your email address to put that into, and a link to where you want people to go AFTER they press join.

py2o3434
05-27-2004, 12:04 AM
hi,asddddddsdsaadsads



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum