the code:
PHP Code:
<h1>Join Us</h1>
<?php
if (isset($_POST['submit'])) { // Form has been submitted
if (isset($errormsg)) { // Error in form
?>
<p style="color: #ff0000;"><strong>Error: </strong><?php print $errormsg;?></p>
<form method="post" action="index.php?page=join">
<table>
<tr>
<td><strong>*CS: Source name:</strong></td>
<td><input type="text" name="cssname" value="<?php print $_POST['cssname'];?>" /></td>
</tr>
<tr>
<td><strong>*Real Name:</strong></td>
<td><input type="text" name="realname" value="<?php print $_POST['realname'];?>" /></td>
</tr>
<tr>
<td><strong>Xfire username (if you have it, recommended):</strong></td>
<td><input type="text" name="xfire" value="<?php print $_POST['xfire'];?>" /></td>
</tr>
<tr>
<td><strong>*Link to PCGF profile:</strong></td>
<td><input type="text" name="profile" value="<?php print $_POST['profile'];?>" /></td>
</tr>
<tr>
<td><strong>*Age:</strong></td>
<td><input type="text" name="age" value="<?php print $_POST['age'];?>" /></td>
</tr>
<tr>
<td><strong>*Why do you want to join?/What can you bring to the clan? (if applicable, e.g. a server *hint* :P)</strong></td>
<td><textarea name="reasons"><?php print $_POST['reasons'];?></textarea></td>
</tr>
<tr>
<td><strong>*E-mail:</strong></td>
<td><input type="text" name="email" value="<?php print $_POST['email'];?>" /></td>
</tr>
<tr>
<td><strong>Do you have a mic?</strong></td>
<td><select name="mic">
<option value="Yes">Yes</option>
<option value="No">No</option>
</select></td>
</tr>
</table>
<p><input type="submit" name="submit" value="Submit" /> <input type="reset" name="reset" value="Reset Form" /></p>
</form>
<?php
} else { // no error message set
if (empty($_POST['cssname']) OR empty($_POST['realname']) OR empty($_POST['profile']) OR (empty($_POST['age']) OR empty($_POST['reasons']) OR empty($_POST['email'])) { // One or more fields left blank
$errormsg = "One or more of the required fields were left blank. Please make sure all fields marked with an * are filled in.";
} else { // All fields fileld in
$cssname = trim($_POST['cssname']);
$realname = trim($_POST['realname']);
$xfire = trim($_POST['xfire']);
$profile = trim($_POST['profile']);
$age = $_POST['age'];
$reasons = $_POST['reasons'];
$email = trim($_POST['email']);
$mic = $_POST['mic'];
// Define mail parameters
$recipient = "pcgf@fnar.sytes.net";
$subject = "Application for " . $cssname . "(" . $realname . ")";
$body = "Someone has applied to join PCGF©! Below are the details that were submitted.\n\n" .
"CS: Source name: " . $cssname . "\n" .
"Real name: " . $realname . "\n" .
"Xfire username: " . $xfire . "\n" .
"PCGF profile: " . $profile . "\n" .
"Age: " . $age . "\n" .
"Reasons for applying:\n\n" .
nl2br($reasons) . "\n" .
"Has a mic: " . $mic . "\n\n" .
"Their e-mail address is: " . $email . "\n\n" .
" - http://fnar.sytes.net/pcgf/";
// Send the mail
mail ($recipient, $subject, $body, "From: $email");
// Print thank you message
?>
<p>Thank you for applying. One of the leaders, either Neoboy or HitRaj 47 will get back to you ASAP.</p>
<?php
} // End IF to check for blank fields
} // End IF to check for errormsg
} else { // Form not submitted, display form
?>
<p>To join, fill in the form below. Fields marked with a * are required.</p>
<form method="post" action="index.php?page=join">
<table>
<tr>
<td><strong>*CS: Source name:</strong></td>
<td><input type="text" name="cssname" /></td>
</tr>
<tr>
<td><strong>*Real Name:</strong></td>
<td><input type="text" name="realname" /></td>
</tr>
<tr>
<td><strong>Xfire username (if you have it, recommended):</strong></td>
<td><input type="text" name="xfire" /></td>
</tr>
<tr>
<td><strong>*Link to PCGF profile:</strong></td>
<td><input type="text" name="profile" /></td>
</tr>
<tr>
<td><strong>*Age:</strong></td>
<td><input type="text" name="age" /></td>
</tr>
<tr>
<td><strong>*Why do you want to join?/What can you bring to the clan? (if applicable, e.g. a server *hint* :P)</strong></td>
<td><textarea name="reasons"></textarea></td>
</tr>
<tr>
<td><strong>*E-mail:</strong></td>
<td><input type="text" name="email" /></td>
</tr>
<tr>
<td><strong>Do you have a mic?</strong></td>
<td><select name="mic">
<option value="Yes">Yes</option>
<option value="No">No</option>
</select></td>
</tr>
</table>
<p><input type="submit" name="submit" value="Submit" /> <input type="reset" name="reset" value="Reset Form" /></p>
</form>
<?php
} // End if to check if form was submitted
?>
the error:
Quote:
|
Parse error: syntax error, unexpected '{' in C:\webserver\hosted\pcgf\join.php on line 83
|
line 83 is where it says:
Quote:
|
if (empty($_POST['cssname']) OR empty($_POST['realname']) OR empty($_POST['profile']) OR (empty($_POST['age']) OR empty($_POST['reasons']) OR empty($_POST['email'])) { // One or more fields left blank
|
as far as i can tell, it looks OK 
|