Running php file from within script
Posted: Sat May 08, 2010 6:33 pm
I'm trying to do what a form action 'file.php' does, that is run file2.php. Only run it from file1.php. I've tried exec(file2.php) and it doesn't work.
Please help
Thanks, R
<head><title>Accounts</title></head>
<body>";
echo $_POST['operation'], "<br>";
switch ($_POST['operation']) {
case "No Change/Exit": <<========== Is it possible to do this exec(ExitProgram.php) or somthing like this
exit("Bye Bye"); == or for that matter run any php script from another php script ==
break;
case "Revise This Account": ==== trying to get code to run from another page =====
echo "<br>Code to revise account goes here<br>";
break;
case "New Account":
echo "<br>Code to add new account goes here<br>";
break;
case "Delete This Account":
echo "<br>Code to delete this account goes here<br>";
break;
default:
exit("Bye Bye");
break;
}
Please help
Thanks, R
Code: Select all
<body>";
echo $_POST['operation'], "<br>";
switch ($_POST['operation']) {
case "No Change/Exit": <<========== Is it possible to do this exec(ExitProgram.php) or somthing like this
exit("Bye Bye"); == or for that matter run any php script from another php script ==
break;
case "Revise This Account": ==== trying to get code to run from another page =====
echo "<br>Code to revise account goes here<br>";
break;
case "New Account":
echo "<br>Code to add new account goes here<br>";
break;
case "Delete This Account":
echo "<br>Code to delete this account goes here<br>";
break;
default:
exit("Bye Bye");
break;
}