Ok, well, I am founding out more and more I hate making sessions(just don't seem good at it...). I have been messing around with it and I have made it where it echos the username but the problem with that is that it doesn't echo right...it says: Welcome,Array when it SHOULD say: Welcome,Sacred
Here is my code:
<?php
session_start('user');
// Use $HTTP_SESSION_VARS with PHP 4.0.6 or less
if (!isset($_SESSION['user'])) {
$_SESSION['user'] = 0;
} else {
$_SESSION['user'] = $_SESSION;
}
?>
Note: That is on all the pages
I know am not doing something right here...just not sure what.
Here is my login form:
<?php if (isset($_SESSION['user'])) {?>
Click <a href="town.php">here</a> to go to the town.
<?php } else {?>
<center>
<form action="check.php" method="post">
<font color="white">Username:</font><br /><input type="text" name="user"><br />
<font color="white">Password:</font><br /><input type="password" name="pass"><br />
<font color="white">E-mail:</font><br /><input type="text" name="email"><br />
<br />
<input type="submit" value="Login">
</form>
<?php }?>
Note: That php code is suppose to make you fill in the form if your not sign in yet and you go somewhere like town.
I don't see why sessions seem so hard :glare: If I can get past this little bit I can get on to the stuff am good at.
Well,thanks in advance, off to school.