well i found what i needed and have it setup and everything all i need is to know where to change it to make it go to a diferent page once you click on register or login
<h1>Register</h1>
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
<table align="center" border="1" cellspacing="0" cellpadding="3">
<tr><td>Username*
/td><td>
<input type="text" name="uname" maxlength="40">
</td></tr>
<tr><td>Password*
/td><td>
<input type="password" name="passwd" maxlength="50">
</td></tr>
<tr><td>Confirm Password*
/td><td>
<input type="password" name="passwd_again" maxlength="50">
</td></tr>
<tr><td>E-Mail*
/td><td>
<input type="text" name="email" maxlength="100">
</td></tr>
<tr><td>Website
/td><td>
<input type="text" name="website" maxlength="150">
</td></tr>
<tr><td>Location</td><td>
<input type="text" name="location" maxlength="150">
</td></tr>
<tr><td>Show E-Mail?</td><td>
<select name="show_email">
<option value="1" selected="selected">Yes</option>
<option value="0">No</option></select>
</td></tr>
<tr><td colspan="2" align="right">
<input type="submit" name="submit" value="Sign Up">
</td></tr>
</table>
</form>
<?php
}
</body>
</html><?php
session_start();
if (!isset($_SESSION['username']) || !isset($_SESSION['password'])) {
$logged_in = 0;
return;
} else {
// remember, $_SESSION['password'] will be encrypted.
if(!get_magic_quotes_gpc()) {
$_SESSION['username'] = addslashes($_SESSION['username']);
}
$pass = $db_object->
<h1>Login</h1>
<form action="<?php echo $_SERVER['PHP_SELF']?>" method="post">
<table align="center" border="1" cellspacing="0" cellpadding="3">
<tr><td>Username
/td><td>
<input type="text" name="uname" maxlength="40">
</td></tr>
<tr><td>Password
/td><td>
<input type="password" name="passwd" maxlength="50">
</td></tr>
<tr><td colspan="2" align="right">
<input type="submit" name="submit" value="Login">
</td></tr>
</table>
</form>
<?php
}
?>
</body>
</html><?php
require 'db_connect.php'; if ($logged_in == 0) {
die('You are not logged in so you cannot log out.');
}
unset($_SESSION['username']);
unset($_SESSION['password']);
// kill session variables
$_SESSION = array();
session_destroy();
header('Location: main.php');
?><?php
require 'db_connect.php';
// require our database connection
// which also contains the check_login.php
// script. We have $logged_in for use.
if ($logged_in == 0) {
die('Sorry you are not logged in, this area is restricted to non-registered members.