PDA

View Full Version : relaying POST data



neonWired
26 Oct 2009, 07:44 AM
Here is my situation. I have two seperate php based applications that i didn't develop residing in a couple of folders on a site, they operate completely seperate from the main site, however my client wants a login form for both on the front page. Rather than create two different login boxes (the simple solution) i figured a single box with radio buttons to select which app to login to would be better. I can think of a few ways to code this, none are ideal, the first one is the use javascript to dynamically change the action when the radio box is changed, however this leaves the problem of a non-javascript alternative which would naturally require some server side scripting. The obvious way is to send the form data to a processor which redirects it based on the radio selected, however relaying POST data has not proven easy (i tried using cUrl). I'm open to suggestions on ways to solve this problem!