I would like a page to load when a function is called
function redirect()
{
print("redirecting..."); //this line prints on page1
header("location: http://www.yahoo.com/"); //but page1 doesnt change to Yahoo
exit;
}
Please help.
2006-07-07
07:53:42
·
5 answers
·
asked by
Ozone
4
in
Computers & Internet
➔ Programming & Design
Thanks for the answers. But think login in page.
Page1 loads, user fills form, click button, function is called.
How to I get page1 to go to different URL based on what the form is passing.
I guess this isnt really a redirect.
2006-07-07
08:05:22 ·
update #1
OK. I must not be phrasing this right.
I just started learning PHP on monday, so bearwith me if I'm oblivious.
I am creating a login page. When the user logs in, I want the username pulled from the form and sent to a function that appends it to the URL e.g. www.mysite.com?username.
I only added the "print("redirecting...");" line to test if the function was being called at all. I just need to construct a URL fromuser input and the load that URL.
Thanks everyone.
2006-07-07
08:18:47 ·
update #2