You can enable error reporting to show of any particular issues with:
PHP Code:
ini_set('display_errors', 1);
error_reporting(E_ALL);
You have a syntax error about half way through. Your logic flow is doesn't properly terminate the first if statement. Immediately after this:
PHP Code:
else{
echo 'You have not met the requirements.';
}
Simply add a
}. If you were to indent your code at each level, you would see this:
PHP Code:
if($mybb->user['uid']){
if(($mybb->user['postnum']) >= 30){
echo 'Registration is currently closed.';
}
else{
echo 'You have not met the requirements.';
}
else{
echo "<form action='forums/member.php' method='post'>
Username: <input type='text' name='username' size='25' maxlength='30' /><br />
Password: <input type='password' name='password' size='25' />
<input type='hidden' name='action' value='do_login'>
<input type='hidden' name='url' value='index.php' />
<input type='submit' class='submit' name='submit' value='Login' /></form><br>";
}
Is what you have logically, so that would attempt to apply to ELSE clauses to a single IF.
Avoid using chdir just to perform inclusions (or any explicit full paths inside of anything except potentially a globally included file). Use relative paths; this way if you change your host or webserver than you don't need to update all of your code again. I can't tell you what goes into the relative block, but if you describe where this file is in relation to chdir location than I could tell you what it needs to be.