John44281 Posted April 1, 2020 Share Posted April 1, 2020 Hi This should be pretty simple but I can't figure it out. I want to create and simple forward to different URL based on the user entry. For example.. If they enter ABC in the box they go to www.11.com if they enter ZXC in the box they go to www.22.com if they enter CCC they go to www.33.com If they enter anything else they get an error message. Thanks for any help!! Quote Link to comment Share on other sites More sharing options...
ginerjm Posted April 1, 2020 Share Posted April 1, 2020 So what have you tried? It's much easier to help you when we see what the code currently looks like. It could be something simple like a switch based upon the incoming value and a switch construct to execute the appropriate header() call but we can't tell unless see a bit more since your explanation wasn't completely clear, ie "create and simple forward". Quote Link to comment Share on other sites More sharing options...
Phi11W Posted April 2, 2020 Share Posted April 2, 2020 17 hours ago, John44281 said: If they enter ABC in the box they go to www.11.com if they enter ZXC in the box they go to www.22.com if they enter CCC they go to www.33.com How about something altogether simpler and more user-friendly: <a href='www.11.com'>ABC</a> <a href='www.22.com'>ZXC</a> <a href='www.33.com'>CCC</a> No need for "error messages" at all. Only give the Users options for things that they're allowed to do. "What's the best way to prevent someone from shooting themselves in the foot? Don't give them a gun in the first place!" Regards, Phill W. 1 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.