2012-08-28, 02:25 PM
Hi,
Does anyone know how to fix this?
Thanks.
Code:
Error Message:
Parse error: syntax error, unexpected $end in /home/a3285398/public_html/login/login.php on line 24
Does anyone know how to fix this?
Thanks.
Code:
<?php
define('IN_MYBB', NULL);
global $mybb, $lang, $query, $db, $cache, $plugins, $displaygroupfields;
require_once '/path/to/mybb_forum/global.php';
require_once '/path/to/MyBBIntegrator.php';
$MyBBI = new MyBBIntegrator($mybb, $db, $cache, $plugins, $lang, $config);
if ($MyBBI->isLoggedIn() === false){
echo '<form id="myloginform" method="post" action="login.php">
<label>Username</label><input type="text" name="username" />
<label>Password</label><input type="password" name="password" />
<input type="submit" name="Login" />
</form>';
/* Was the submit button pressed? If so, do the login routine */
if (isset($_POST['Login'])){
$logmein = $MyBBI->login($_POST['username'], $_POST['password']);
if ($logmein == true) echo 'Logged in successfully';
else echo 'The login routine failed';
}
else{
echo 'Hello, ', $MyBBI->mybb->user['username'], '. You're already logged in.';
}
?>
Error Message:
Parse error: syntax error, unexpected $end in /home/a3285398/public_html/login/login.php on line 24