fluidsharp Posted December 22, 2009 Share Posted December 22, 2009 Hello. How I can involve immediately for execute other php-file from main php-file by condition. I've tried to use require() and include() but they just share variable. And looked at forum but didn't find solution, or didn't understand ). Thanks in advance! Quote Link to comment Share on other sites More sharing options...
Deoctor Posted December 22, 2009 Share Posted December 22, 2009 the php files which u are including will do any action on the variables that u are having from the main.php file Quote Link to comment Share on other sites More sharing options...
ChemicalBliss Posted December 22, 2009 Share Posted December 22, 2009 Also, you need to state what "conditions" you require beofre including the file, give us some info on what you are trying to do . -CB- Quote Link to comment Share on other sites More sharing options...
fluidsharp Posted December 22, 2009 Author Share Posted December 22, 2009 I've found way, i've changed rules and involve those files from form and use POST, and conditions (if-else) is in involved file. sorry for distraction but yours reply set thinking me. Thanks. ps. go to next step... Quote Link to comment Share on other sites More sharing options...
ChemicalBliss Posted December 22, 2009 Share Posted December 22, 2009 I'm glad you found your solution . Just a note on security; Never do this: <?php include($_POST['filename']); ?> Instead do this: <?php Switch($_POST['filename']){ default: include('index.php'); break; case 'file1': Include('path/to/file1.php'); break; } ?> I'm sure you will understand why -CB- 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.