bakhtiyar Posted August 9, 2007 Share Posted August 9, 2007 How do I call another script(CGI or PHP) from a PHP script? Say, I have two scripts send.php and receive.php and another html file, say param.html. param.html will have one text box, say username. When you click on the submit button in param.html, the parameter 'username' is sent to receive.php. Now can I call the script 'receive.php' from the script 'send.php' and also send a value for the parameter 'username'? Can you please give me a solution without using header('Location:......') Thanks in advance Bakhtiyar Uddin Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted August 9, 2007 Share Posted August 9, 2007 What does receive.php and and send.php do? You'll probably want to include send.php into receive.php. This will merge send.php into receive.php allowing send.php to use any variables/functions set within receive.php Quote Link to comment Share on other sites More sharing options...
bakhtiyar Posted August 9, 2007 Author Share Posted August 9, 2007 I need to get this working for a larger project. I want to know how to call a script(receiver.php) from another script(send.php) and pass parameter values(value for the parameter 'username') while doing that. thanks Quote Link to comment Share on other sites More sharing options...
trq Posted August 9, 2007 Share Posted August 9, 2007 You could use exec. 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.