Code: Select all
<?
function show_form($clan_name="",$clan_tag="", $viewemail="") { ?>
<form action="modules.php?name=League&file=create_clan" method="post">
First Name:
<input type=text name=clan_name value="<?echo $clan_name?>"><br>
Last Name:
<input type=text name=clan_tag value="<?echo $clan_tag?>"><br>
E-Mail:
<select id="ViewE-Mail" name="viewemail">
<option value="<?$email_Yes?>">Yes</option>
<option value="<?email_No?>">No</option>
</select><br>
<input type=submit>
</form>
<? }
if(!isset($clan_name)) {
show_form();
}
else {
if(empty($clan_name) or empty($clan_tag)) {
echo "You did not fill in all required fields, please try again<p>";
show_form($clan_name, $clan_tag, $viewemail);
}
else {
echo "Thank you, $clan_name was successfully created!<br>";
// Test if the email worked here, but what variable do I use???
}
}
?>