PDA

View Full Version : Can't find my mistake...



Dimava
Fri 10th May '02, 8:03pm
I'm getting an error on the last line in this: (the </html>)



<?php
// Important! You have to include it before your html code
include_once "/home/virtual/site3/fst/var/www/html/poll/poll_cookie.php";
?>
<html>
<head>
<title>NXStaff</title>
</head>
<?php include("templates/header.htm"); ?>

<?php
require("admins/config.php");
$link = mysql_pconnect( "localhost", $user, $pass );
mysql_select_db( $db, $link );

include("templates/staff/staff_start.php");

if ( $staffmember == "" ) {
$result = mysql_query("SELECT * FROM staff ORDER BY id");
while(list($id, $username) = mysql_fetch_row($result)){
include("templates/staff/stafflist_member.php");
}
include("templates/staff/stafflist_end.php");

if ( $staffmember != "") {
$result = mysql_query("SELECT username,avatar,position,email,additionalinfo FROM staff WHERE id=$staffmember");
// If an invalid id is presented

if(!@mysql_num_rows($result)){
include("templates/staff/error.php");
}

else {
list($username,$avatar,$position,$email,$additiona linfo) = mysql_fetch_row($result);
include("templates/staff/staff_member.php");
}
}

mysql_close($link);
include("templates/staff/staff_end.php");
include("templates/footer.htm");
?>
</body>
</html>


thanks

-Dimava

megahard
Fri 10th May '02, 8:11pm
if ( $staffmember == "" ) {

isn't paired off


i think you need to change:

if ( $staffmember != "") {

to

} elseif ( $staffmember != "") {

Dimava
Fri 10th May '02, 8:58pm
yep, thanks