Okay, this is the layout I tried out for testing. I added in the echo statements for debugging purposes.
From login form:
Username = $character
Password = $password
<?
$new_character = strtolower($character);
$filename = "/rpg/mud/lib/people/".$new_character[0]."/".$new_character.".o";
echo $new_character;
echo "<br>";
echo $filename;
echo "<br>";
if(file_exists($filename)) {
$f = fopen($filename, "r");
echo $filename;
echo "<br>";
echo $f;
echo "<br>";
if ($f) {
while ($line = fgets($f))
if (ereg("^password \"(.*)\"$", trim($line), $reOut)) {
$password = $reOut[1];
break;
}
// if (!isset($password))
// } else
}
}
else
if(file_exists($filename)) {
echo "
<p>
Welcome back, $character.<BR><BR>
";
}
?>
Now this is the result I am getting:
mystic
/rpg/mud/lib/people/m/mystic.o
/rpg/mud/lib/people/m/mystic.o
Resource id #1
Warning: Wrong parameter count for fgets() in
/rpg/public_html/new_layout/character.php on line 116
Is there something here I am missing?
-- M