Need explanation, please

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

qim
New php-forum User
New php-forum User
Posts: 7
Joined: Sat Mar 23, 2013 10:39 am

Need explanation, please

Postby qim » Thu Feb 20, 2014 2:13 pm

I've inherited a php login procedure that is perfect except for a tiny little "/"

When after logging in you are allowed into the page, it opens with a slash at the end of the url, and that is causing the page not to display properly.

I have been trying to understand what is causing the "/". Not knowing much about php (and not alot more about htnl/css...) I am at a loss. i think it might be to do with the following line which is at the end og the script.

Could you "translate" it for me, please, and let me know if I can get rid of the slash here?

Code: Select all

header("location: ".$_SESSION['current']."/"); 

Thank you

PS - Maybe I should explain better. if you enter my site at pintotours.net and follow the login procedure from the front page (the index page) after you login you get taken back to the front page - perfect!

However, if you call the login page from one of the country pages, even though you do the login in the very same place, when you are allowed in you are taken to the page where you were- fine! .... but because it tried to open the page adding a slash at the end of the address, the page does not reproduce properly.

if you go into the Bali page from the fron page, you will see a box in the right sidebar named "Incoming Agents". If you were to press the "Go to login area", you would then commence the procedure.

I would be very grateful if someone could help me get rid of the blasted slash!!!

seandisanti
php-forum Fan User
php-forum Fan User
Posts: 838
Joined: Mon Oct 01, 2012 12:32 pm

Re: Need explanation, please

Postby seandisanti » Wed Feb 26, 2014 12:36 pm

just modify the quoted line...
header("location: ".$_SESSION['current']."/");

to be

Code: Select all

header("location: ".$_SESSION['current']);


Return to “PHP coding => General”

Who is online

Users browsing this forum: No registered users and 3 guests