Re: [PHP] Calling a program
- Date: Mon, 30 Nov 2015 15:40:55 -0500
- From: Curtis Maurand <curtis@xxxxxxxxxxx>
- Subject: Re: [PHP] Calling a program
On 11/30/2015 3:33 PM, Ashley Sheridan wrote:
Maybe not, but it can be done that way. I never said it was correct.
The right way would be to write a class and use the methods of that
class to do what you need based on the choice made.
$script_result = shell_exec('p7a.php');
There is a lot of useful information here once you get past the snide
comments at the top.
On 11/29/2015 11:36 PM, Ethan Rosenberg wrote:
Dear List -
Can you not call a PHP script from a form -- action = 'program.php'?
In my hands it does not work...
I have tried the following
later in the program ...
echo "<input type='hidden' name='next_step' value='step14' />";
switch ( $_POST['next_step'] )
} //end Switch
The result of this is that program.php runs at the start of the
script, and step14 is never called.
I am totally confused.
If you need more details, please specify.
shell_exec is *not* the right method here. As others have pointed out, it appears there's a lack of understanding about how the PHP stack works with regards to requests and logic.