Register.php gå automatisk til main.php i mit loginsystem
Hej jeg er ved at oprette et login system til min hjemmeside. Jeg har downloadet jpware login system og har uploadet det til min ftf og opretter database og tabeller og det hele.Det eneste problem jeg har lige nu er, at min register.php går automatisk til main.php.
I kan prøve at se her:
http://oddsxperten.slackr.dk/register.php
Så vil den automatisk selv skifte til http://oddsxperten.slackr.dk/main.php
Er der nogle der har erfaring med dette eller noget?
Håber i kan hjælpe.
min register.php fil ser således ud:
<?php
/**
* Register.php
*
* Displays the registration form if the user needs to sign-up,
* or lets the user know, if he's already logged in, that he
* can't register another name.
*
* jpWare php login system v.1.0.0
* Copyright (C) 2009, Vlad Hristov (www.wonderwebware.com)
* Copyright (C) 2004,2009 entity known as jpmaster77 (www.evolt.org/node/60384) and Ivan Novak (www.ivannovak.com)
* Last Updated: Nov 24, 2009
*/
include("include/session.php");
if(!FREE_REGISTRATION){
header("Location: main.php");
}
?>
<?php include("_header.html"); ?>
<div id="main" class="container_12">
<?php
/**
* The user is already logged in, not allowed to register.
*/
if($session->logged_in){
echo "<h1>Registered</h1>";
echo "<p>We're sorry <b>$session->username</b>, but you've already registered. "
."<a href=\"main.php\">Main</a>.</p>";
}
/**
* The user has submitted the registration form and the
* results have been processed.
*/
else if(isset($_SESSION['regsuccess'])){
/* Registration was successful */
if($_SESSION['regsuccess']){
echo "<h1>Registered!</h1>";
if(EMAIL_WELCOME){
echo "<p>Thank you <b>".$_SESSION['reguname']."</b>, you have been sent a confirmation email which should be arriving shortly.</p>";
if(CONFIRMATION_REQUIRED){
echo "<p>Please confirm your registration before you continue.<br />Back to <a href='main.php'>Main</a></p>";
}
}else{
echo "<p>Thank you <b>".$_SESSION['reguname']."</b>, your information has been added to the database, "
."you may now <a href=\"main.php\">log in</a>.</p>";
}
}
/* Registration failed */
else{
echo "<h1>Registration Failed</h1>";
echo "<p>We're sorry, but an error has occurred and your registration for the username <b>".$_SESSION['reguname']."</b>, "
."could not be completed.<br>Please try again at a later time.</p>";
}
unset($_SESSION['regsuccess']);
unset($_SESSION['reguname']);
}
/**
* The user has not filled out the registration form yet.
* Below is the page with the sign-up form, the names
* of the input fields are important and should not
* be changed.
*/
else{
?>
<h1>Register</h1>
<?php
if($form->num_errors > 0){
echo "<td><font size=\"2\" color=\"#ff0000\">".$form->num_errors." error(s) found</font></td>";
}
?>
<div id="register">
<form action="process.php" method="POST">
<p class="textinput">Name: </p><p><input type="text" name="name" maxlength="30" value="<?php echo $form->value("name"); ?>"><?php echo $form->error("name"); ?></p>
<p class="textinput">Username: </p><p><input type="text" name="user" maxlength="30" value="<?php echo $form->value("user"); ?>"><?php echo $form->error("user"); ?></p>
<p class="textinput">Password: </p><p><input type="password" name="pass" maxlength="30" value="<?php echo $form->value("pass"); ?>"><?php echo $form->error("pass"); ?></p>
<p class="textinput">Email: </p><p><input type="text" name="email" maxlength="50" value="<?php echo $form->value("email"); ?>"><?php echo $form->error("email"); ?></p>
<p class="textinput"><input type="hidden" name="subjoin" value="1"><input type="submit" value="Join!"></p>
<p><a href="main.php">[Back to Main]</a></p>
</form>
</div>
<?php
}
?>
</div>
<?php include("_footer.html"); ?>
