unrealindeed Posted May 8, 2009 Share Posted May 8, 2009 Hi All, Im a newbie, so please...be gentle :-) OK, so I have a small, prob easy to answer question. I have a 4 clients that login to 4 different servers. Instead of creating 4 different html pages with 4 forms with 4 individual actions eg: https://server1.mydomain.com/obs/user/logon.do https://server2.mydomain.com/obs/user/logon.do https://server3.mydomain.com/obs/user/logon.do https://server4.mydomain.com/obs/user/logon.do I have created 1 frameset & I would like to write a piece of code that will redirect a user to the correct server page based on their username. If (username = joe) {login to https://server1.mydomain.com/obs/user/logon.do } elseif (username = pat) {login to https://server2.mydomain.com/obs/user/logon.do } If (username = mat) {login to https://server3.mydomain.com/obs/user/logon.do } elseif (username = ben) {login to https://server4.mydomain.com/obs/user/logon.do } Once logged in the topFrame will show our logo, but the MainFrame will login to the corresponding server, I have the frameset and all built I just need a hand with the code...I have nothing! Any help or if you know of any such scripts would be greatly appreciated. Unreal Quote Link to comment Share on other sites More sharing options...
ILMV Posted May 8, 2009 Share Posted May 8, 2009 You can use header() to send them to the new page. header('Location: http://www.example.com/'); ILMV Quote Link to comment Share on other sites More sharing options...
Ken2k7 Posted May 8, 2009 Share Posted May 8, 2009 The If (username = mat) should be an else if. I would have use a switch. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.