I am working on building a website for my world of warcraft guild and I am trying to make a basic application that non-members can fill out so our guild master can review them and accept members as he pleases. All of the code "works" but the only problem is when I try to give the info back to the applicant not all of the information is there. I have also cut out some of the select options to make the code much quicker to read
Here is the application form:
<?php
function guild_application() {
?>
<form method="post" action="processapp.php">
<table width="500" frame="border" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="250" height="25">Character's Name:</td>
<td width="250"><input name="name" type="text" size="30" maxlength="30"></td>
</tr>
<tr>
<td height="25">Character's Race:</td>
<td valign="top"><select name="name">
<option value="Human" selected>Human</option>
<option value="Dwarf">Dwarf</option>
<option value="Night Elf">Night Elf</option>
<option value="Gnome">Gnome</option>
</select></td>
</tr>
<tr>
<td height="25">Character's Class:</td>
<td><select name="class">
<option value="Druid" selected>Druid</option>
<option value="Hunter">Hunter</option>
<option value="Mage">Mage</option>
<option value="Priest">Priest</option>
<option value="Paladin">Paladin</option>
<option value="Rogue">Rogue</option>
<option value="Warrior">Warrior</option>
<option value="Warlock">Warlock</option>
</select></td>
</tr>
<tr>
<td height="25">Character's Level:</td>
<td><select name="lvl">
<option value="1" selected>1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
...
<option value="60">60</option>
</select></td>
</tr>
<tr>
<td height="50">Other Guild Affilations (if any):</td>
<td><textarea name="affilations" cols="25" rows="3">None</textarea></td>
</tr>
<tr>
<td height="57" colspan="2" align="center"><h4>You have read and agreed to the Soul
Society Guild Guidelines, and understand that you will be held to them and
that if you break any of the set guidelines it is grounds for removal from
the guild?</h4></td>
</tr>
<tr>
<td height="25" colspan="2">YES, I agree:</td>
<td colspan="2" align="left"> <input type="checkbox" name="guidlines_aggreement" value="checkbox">
</td>
</tr>
<tr>
<td colspan="2" align="center"><input type="submit" name="Submit" value="Submit Application"></td>
</tr>
</table>
</form>
<?php
}
?>
Here is the output (the e-mail information isn't implicated yet because I am testing the output just through HTML until I can get it to display all the information properly):
<?php
include_once('includes.php');
// Set Application Variables
$name = $_POST['name'];
$race = $_POST['race'];
$class = $_POST['class'];
$level = $_POST['lvl'];
$ga = $_POST['affiliations'];
$gg = $_POST['guidlines_aggreement'];
$appcontent = '<b>Character Name:</b>' .$name."\n"
.'<b>Character Race:</b>' .$race."\n"
.'<b>Character Class:</b>' .$class."\n"
.'<b>Character Level:</b>' .$level."\n"
.'<b>Guild Affilations:</b>' .$ga."\n";
do_html_header('Guild Application');
links();
if (!$gg) {
echo 'If you do not or cannot agree to the guild guidelines, then we cannot accept your application.';
}
else {
echo "Your application has been sent, below is a copy of your application:";
echo '<br />';
echo nl2br($appcontent);
echo '<br />';
echo "<strong>In the event that you are accepted into the guild, you will be contacted in game.</strong>";
}
footer();
?>
When I submit the form I get an output that looks somehwhat like this:
Your application has been sent, below is a copy of your application:
Character Name: Human
Character Race:
Character Class: Warrior
Character Level: 27
Guild Affiliations:
I have input information in to all of the fields and I get no proper return on the Name or the Affiliations sections.
What am I doing wrong?