Customizing SMF > SMF Coding Discussion
SSI.php Redirect Not Redirecting
(1/1)
Scotty1207:
Hi,
I need to redirect my users when I log in to my Home.php file, however it still redirects them to the forum. My code is below:
--- Code: ---<?php
require_once('../Forum/SSI.php');
$_SESSION['login_url']='Home.php'.$_SERVER['PHP_SELF'];
$_SESSION['logout_url']='Home.php'.$_SERVER['PHP_SELF'];
if ($context['user']['is_guest'])
{
ssi_login();
}
else
{
//You can show other stuff here. Like ssi_welcome(). That will show a welcome message like.
//Hey, username, you have 552 messages, 0 are new.
ssi_logout();
}
?>
--- End code ---
emanuele:
Hello Scotty,
1st
--- Code: ---'Home.php'.$_SERVER['PHP_SELF'];
--- End code ---
would create something like:
--- Code: ---Home.php/forum/index.php
--- End code ---
probably not what you are looking for.
2nd:
--- Code: ---ssi_login('http://www.yourdomain.tld/Home.php');
--- End code ---
The same for logout. ;)
Scotty1207:
Thanks so much and you explained it perfectly. If I could give rep I would.
Navigation
[0] Message Index
Go to full version