having problems with a header redirect
i am trying to redirect to
http://www.mysite.com/somepage
the problem is header info is being added before my link, so it is resolving as
http://www.mysite.com/component/uddeim/www.mysite.com/somepage

my code is:
session_start();
$adredirect = $_SESSION;
header( "LOCATION:, $adredirect" );

the value stored in $adredirect is www.mysite.com/somepage

do you think forcing a ob flush thing would work before the session start?
anyways my kids are starving for dinner so i can't spend the two hours it seems to always take me to figure this stuff out.
Thanks in advance for any help.
Paul

Recommended Answers

All 5 Replies

try adding http:// before $adredirect

try adding http:// before $adredirect

thanks
I will try that as soon as i get the kids to bed, and let you know how it goes

header( "LOCATION:, $adredirect" );

What's that comma doing after the Location: header?

try adding http:// before $adredirect

Well got the kids to bed and, jstfsklh211 YOU ARE THE MAN!!! the http:// thing worked great.
Thankyou.

hag++ the comma was just a typo, but thanks.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.