grn Posted May 12, 2009 Share Posted May 12, 2009 Hi, I have a webpage that will take user input, username, password etc. and we need to call a script from php that will then want to see the username on one line, the password on another and then return an exit status of 1 or 0 which I can then deal with. I am stuck with how to do this as everything I can find would have everything run on one line, rather than split as described above. We cannot have something run on the command line with arguments as these will contain a username and password, which anyone else on that server would see by looking at the processes that are running. Does anyone have any advice on how to achieve this? thanks, Graham. Quote Link to comment https://forums.phpfreaks.com/topic/157828-pass-variables-on-multiple-lines/ Share on other sites More sharing options...
Ken2k7 Posted May 12, 2009 Share Posted May 12, 2009 Well you can send the input, username and password over to the other PHP page using a form with POST or GET method. Set the form action attribute to be the second PHP file. Quote Link to comment https://forums.phpfreaks.com/topic/157828-pass-variables-on-multiple-lines/#findComment-832454 Share on other sites More sharing options...
grn Posted May 12, 2009 Author Share Posted May 12, 2009 The scripts that needs to run is a binary on the server and another perl script that resides locally on that server. thanks, Graham. Quote Link to comment https://forums.phpfreaks.com/topic/157828-pass-variables-on-multiple-lines/#findComment-832457 Share on other sites More sharing options...
Daniel0 Posted May 12, 2009 Share Posted May 12, 2009 Store it in a config file? Quote Link to comment https://forums.phpfreaks.com/topic/157828-pass-variables-on-multiple-lines/#findComment-832463 Share on other sites More sharing options...
grn Posted May 12, 2009 Author Share Posted May 12, 2009 Sorry I wasn't clear. page1 - takes username/password from the user this calls another page on submit that runs a script or application that resides on the server, passing the input taken from the user one line at a time. Graham. Quote Link to comment https://forums.phpfreaks.com/topic/157828-pass-variables-on-multiple-lines/#findComment-832534 Share on other sites More sharing options...
grn Posted May 13, 2009 Author Share Posted May 13, 2009 Someone else mentioned php expect, but information seems thin on the ground - anyone know any good sources of info for this? Graham. Quote Link to comment https://forums.phpfreaks.com/topic/157828-pass-variables-on-multiple-lines/#findComment-833065 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.