Ok i'v been searching all night and trying everything I can to redirect my login for my site.
at the very top of my page I have
require ("forums/ssi.php");
and for the login I have
<?php $current_url = $_SERVER['PHP_SELF']; ssi_login($current_url); ssi_logout($current_url); ?>
this won't work I have no Idea why it just keeps sending me to the forums
Any Ideas?
thanks in advance,
Angel
smf rc1
Do this:
<?php echo $_SERVER['PHP_SELF']; ?>
And I think you'll see why...
Ok basically that tells me nothing I guess I forgot to mention I'm a php noob I was only following instructions I found in another post. So then since apparently none of the other posts instructions are working for me what can I do? I have no Idea how to make the login redirect back to the page they log in from.
t.y.i.a
Angel
$_SERVER['PHP_SELF'] does not contain the URL. If you were in SMF, <? echo $_SERVER['PHP_SELF']; ?> will return "index.php", not "http://yoursite.com/folder/index.php".
Thanks for helping me oristo, :D.
So what should I do then, how do I make it work?
Anybody? I searched and searched and I can't make this work, so any help would be greatly appreciated.
(You are going to have to do some work yourself....)
http://ca3.php.net/manual/en/reserved.variables.php#reserved.variables.server
Try HTTP_HOST.
:( sad, bad thread.
I've got something similar to this on my site at http://www.stickboarder.be/ . I've changed the code below to make it more generic. This should work for you:
<?php
require ("forums/ssi.php");
global $context;
ssi_welcome();
if ($context['user']['is_guest']) {
ssi_login("http://".$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF']);
} else {
echo " ";
ssi_logout("http://".$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF']);
echo "<br><br>";
}
echo "Online: ";
ssi_logOnline();
$stats = ssi_boardStats("array");
echo "<br><br><br><b><center>Forum Statistics</center></b><br>
<i>Members:</i> {$stats['members']}<br>
<i>Topics:</i> {$stats['topics']}<br>
<i>Posts:</i> {$stats['posts']}";
?>
You'll probably want to omit the stats at the bottom, but the general idea is there.
I think is near impossible I tried everything and nothing worked. :(
http://www.hammergames.net/
Tried to look at your site, (@t 25 march 06), but it says "ACCOUNT SUSPENDED contact billing department"
Just a hunch, but I think that may cause 'login issues'. :-[