News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Can't make the login redirect work have been searching all night!

Started by MrsAngelD, January 03, 2006, 03:44:49 AM

Previous topic - Next topic

MrsAngelD

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
Noize Pollution [nofollow] | Tp's Block Codes [nofollow] | Angel's World Online [nofollow] | FreeNetBuilders [nofollow]

Orstio

Do this:

<?php echo $_SERVER['PHP_SELF']; ?>

And I think you'll see why...

MrsAngelD

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
Noize Pollution [nofollow] | Tp's Block Codes [nofollow] | Angel's World Online [nofollow] | FreeNetBuilders [nofollow]

Orstio

$_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".

MrsAngelD

Thanks for helping me oristo,  :D.

So what should I do then, how do I make it work?
Noize Pollution [nofollow] | Tp's Block Codes [nofollow] | Angel's World Online [nofollow] | FreeNetBuilders [nofollow]

MrsAngelD

Anybody? I searched and searched and I can't make this work, so any help would be greatly appreciated.
Noize Pollution [nofollow] | Tp's Block Codes [nofollow] | Angel's World Online [nofollow] | FreeNetBuilders [nofollow]



Daniel15

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.
Daniel15, former Customisation team member, resigned due to lack of time. I still love everyone here :D.
Go to smfshop.com for SMFshop support, do NOT email or PM me!

otario


orville_Elf

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'.  :-[

Advertisement: