::..Logged::in..::
you are logged in.
view you profile
here
or logout
here
.
Login failed, bad username or password } } elseif($_GET['action'] == 'change') { if(!isset($_POST['name']) || !isset($_POST['email']) || !isset($_POST['url']) || !isset($_POST['newpass'])) { //this checks that all the fields are filled in ?> all fields were not filled in } $file = file($datafile); while(list(,$value) = each($file)){ list($fname,$femail,$furl,$fuser,$fpass) = explode('|', $value); if($_SESSION['name'] == $fuser){ //opens data file to change it $oldword = "$fname|$femail|$furl|$fuser|$fpass|"; $newword = $_POST['name'] . '|' . $_POST['email'] . '|' . $_POST['url'] . '|' . $_SESSION['name'] . '|' . $_POST['newpass'] . '|'; $fp = fopen($datafile, 'r'); $data = fread($fp, filesize($datafile)); fclose($fp); $newdata = str_replace($oldword, $newword, $data); $fp = fopen($datafile, 'w'); fwrite($fp,$newdata) or die ('error writing'); fclose($fp); $succ = true; //data changed sucessfully ?> Yor profile was updated successfully please
login
$_SESSION['name'] = FALSE; $_SESSION['pass'] = FALSE; $_SESSION['url'] = FALSE; $_SESSION['realname'] = FALSE; $_SESSION['email'] = FALSE; } } if($succ !== true) { ?> Login failed, bad username/password } } else { exit; } ?>