ik heb een login systeem.... hij werkte supper maar nadat ik er dingen in heb verandert krijg in de volgende error
dit is de php code :
Code:
Parse error: syntax error, unexpected $end in ...../login.php on line 112
dit is de php code :
PHP:
<?php
$username="####";
$password="#####";
$database="#####";
/**
* Main.php
*
* This is an example of the main page of a website. Here
* users will be able to login. However, like on most sites
* the login form doesn't just have to be on the main page,
* but re-appear on subsequent pages, depending on whether
* the user has logged in or not.
*
* Written by: Jpmaster77 a.k.a. The Grandmaster of C++ (GMC)
* Last Updated: August 26, 2004
*/
include("include/session.php");
?>
<table>
<tr><td>
<?php
/**
* User has already logged in, so display relavent links, including
* a link to the admin center if the user is an administrator.
*/
if($session->logged_in){
$linkfavostations = mysql_connect(localhost,$username,$password);
mysql_select_db($database,$linkfavostations);
$resultfavostations = mysql_query("SELECT * FROM members_favo WHERE username = $session->username ",$linkfavostations);
$favostationscount = mysql_num_rows($resultfavostations);
if ( $favostationscount == 0 ) {
$favoradiotext="je hebt nog geen favorite radio";
} else {
$favoradiotext="je $favostationscount favo radiostaions";
}
echo "<table width=\"200\" border=\"0\">";
if($session->isAdmin()){
echo "<tr>
<td><center>welkom admin $session->username</center> </td>
</tr>
<td><center>
<a href=\"admin_index.php\">je profiel </a>
</center></td>";
} else {
echo "<tr>
<td><center>welkom $session->username</center> </td>
</tr>
<tr>
<td><center>
<a href=\"userinfo.php?user=$session->username\">je profiel </a>
</center></td>
</tr>
<tr>
<td><center> <a href=\"userinfo.php?user=$session->username\">$favostationscount</a></center></td>
</tr>
<tr>
<td><center>
<a href=\"member_addradio.php\">voeg radiostation toe</a>
</center></td>
</tr>
<tr>
<td><center>
<a href=\"/member_loguit.php\">uitloggen </a>
</center></td>
</tr>
</table>
";
}
if($session->logged_in){
} else {
if($form->num_errors > 0){
echo "<font size=\"2\" color=\"#ff0000\">".$form->num_errors." error(s) found</font>";
}
?>
<form action="process.php" method="POST">
<table align="left" border="0" cellspacing="0" cellpadding="3">
<tr><td>Username:</td><td><input type="text" name="user" maxlength="30" value="<? echo $form->value("user"); ?>"></td><td><? echo $form->error("user"); ?></td></tr>
<tr><td>Password:</td><td><input type="password" name="pass" maxlength="30" value="<? echo $form->value("pass"); ?>"></td><td><? echo $form->error("pass"); ?></td></tr>
<tr><td colspan="2" align="left"><input type="checkbox" name="remember" <? if($form->value("remember") != ""){ echo "checked"; } ?>>
<font size="2">ondhoud mij
<input type="hidden" name="sublogin" value="1">
<input type="submit" value="Login"></td></tr>
<tr><td colspan="2" align="left"><br><font size="2">[<a href="forgotpass.php">wachtwoord vergeten?</a>]</font></td><td align="right"></td></tr>
<tr><td colspan="2" align="left"><br>Not registered? <a href="register.php">maak een acount!</a></td></tr>
</table>
</form>
<?php
mysql_close($linkfavostations);
}
?>
</td></tr>
</table>
</body>
</html>
PHP: