tommyturner2007 Posted May 12, 2008 Share Posted May 12, 2008 Hello, I am rather new to PHP, but quite familiar with HTML. My question is, If I have a php file for example that looked like this: <php <variable text> /php> How could I create another PHP file with a simple form, that I can just type in my variable text and it will run the php script with the variable text in place. Do you understand? Thank's, Tom Turner Quote Link to comment Share on other sites More sharing options...
GingerRobot Posted May 12, 2008 Share Posted May 12, 2008 Really depends on how you want it to work. If you just wanted to run the users commands, you could use the eval() function on the string. If you wanted to save it for later, you could use fwrite() Running user's commands is a very dangerous thing to do, however. Perphaps if you told us a bit more about what you're trying to achieve, we could help more. Quote Link to comment Share on other sites More sharing options...
tommyturner2007 Posted May 12, 2008 Author Share Posted May 12, 2008 Really depends on how you want it to work. If you just wanted to run the users commands, you could use the eval() function on the string. If you wanted to save it for later, you could use fwrite() Running user's commands is a very dangerous thing to do, however. Perphaps if you told us a bit more about what you're trying to achieve, we could help more. Thank you. There is a script in the internet that gathers various information about a target source, but requires you to open the script and change the url you are targetting, manually each time. So I wanted to find a way to simply enter the target url into a online form, rather than reupload the file each time Quote Link to comment Share on other sites More sharing options...
GingerRobot Posted May 12, 2008 Share Posted May 12, 2008 Really depends on how you want it to work. If you just wanted to run the users commands, you could use the eval() function on the string. If you wanted to save it for later, you could use fwrite() Running user's commands is a very dangerous thing to do, however. Perphaps if you told us a bit more about what you're trying to achieve, we could help more. Thank you. There is a script in the internet that gathers various information about a target source, but requires you to open the script and change the url you are targetting, manually each time. So I wanted to find a way to simply enter the target url into a online form, rather than reupload the file each time Why not just modify the script to take the url you are wanting to gather information for from the query string? 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.