Chyea Posted October 30, 2009 Share Posted October 30, 2009 I remember there being a function where something like this could be done, but I can't quite remember what it is exactly or what it is called. example: <?php if(isset($_POST['postform'])){ mysteryfunction($_POST['codetorun']); } else { echo" <form method='post'> <input type='text' value='' name='codetorun' /> <input type='submit' name='postform' value='Submit' /> </form>"; } ?> And say the codetorun value that I type in would be something like, echo base64_encode("HEY"); Does anybody know what I'm talking about? Can probably clarify better if need be. Thanks. Link to comment https://forums.phpfreaks.com/topic/179688-solved-running-php-code-through-a-function-or-running-php-code-that-comes-from-_post/ Share on other sites More sharing options...
trq Posted October 30, 2009 Share Posted October 30, 2009 eval. But it is a very bad idea given your design. Link to comment https://forums.phpfreaks.com/topic/179688-solved-running-php-code-through-a-function-or-running-php-code-that-comes-from-_post/#findComment-948094 Share on other sites More sharing options...
Chyea Posted October 31, 2009 Author Share Posted October 31, 2009 eval. But it is a very bad idea given your design. Thanks thats what I was looking for. And yeah that was just an example dont worry =P Later /solved Link to comment https://forums.phpfreaks.com/topic/179688-solved-running-php-code-through-a-function-or-running-php-code-that-comes-from-_post/#findComment-948138 Share on other sites More sharing options...
trq Posted October 31, 2009 Share Posted October 31, 2009 eval is usually not the answer. But yeah, have fun. Oh, and ps. The solved button is in the bottom left corner. Link to comment https://forums.phpfreaks.com/topic/179688-solved-running-php-code-through-a-function-or-running-php-code-that-comes-from-_post/#findComment-948140 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.