Search Webmaster Help and Solution

User Login Redirection

Howdy!

Im having some troubles,
I have a login system, index.php holds the form for the user to log in.
When user logs in successfully, theres a script that executes echos and displays whats in the echo on the same file (index.php)

PHP Code: <?
if($session->logged_in){
echo ;
echo Welcome <b>$session->username</b>, you are logged in. <br><br>
.<a href=userinfo.php?user=$session->username>My Account</a> |
.<a href=useredit.php>Edit Account</a> | ;
if($session->isAdmin()){
echo <a href=admin/admin.php>Admin Center</a> | ;
}
echo <a href=process.php>Logout</a><br>;
}
else{
?> How can I make it so when the form is submitted, the user is then directed to say, main.php? or just another webpage?

thanks (:

Note: ive tried multiple ways, what lets me down is where to add extended code into the php because I usually get a syntax error and cant view the page. Howdy!

Im having some troubles,
I have a login system, index.php holds the form for the user to log in.
When user logs in successfully, theres a script that executes echos and displays whats in the echo on the same file (index.php)

PHP Code: <?
if($session->logged_in){
echo ;
echo Welcome <b>$session->username</b>, you are logged in. <br><br>
.<a href=userinfo.php?user=$session->username>My Account</a> |
.<a href=useredit.php>Edit Account</a> | ;
if($session->isAdmin()){
echo <a href=admin/admin.php>Admin Center</a> | ;
}
echo <a href=process.php>Logout</a><br>;
}
else{
?> How can I make it so when the form is submitted, the user is then directed to say, main.php? or just another webpage?

thanks (:

Note: ive tried multiple ways, what lets me down is where to add extended code into the php because I usually get a syntax error and cant view the page.

View Complete Thread with Replies

Related Items

Query failed: connection to localhost:3354 failed (errno=111, msg=Connection refused).