play_ Posted December 11, 2007 Share Posted December 11, 2007 I have a text field and a button. When the user types a text in the text field and clicks the button, ajax gets the value of the text field, sends it to a php script as POST and the php script creates a folder with the value passed. Now. say the php file is called make.folder.php so when the user clicks the button, a value is passed to make.folder.php. But what if someone types into their browser www.example.com/make.folder.php? How can i prevent this? even though it's post and not get, i've been told there are tools for passing POST. so someone could run a loop and create bunch of folders. thanks. Link to comment https://forums.phpfreaks.com/topic/81210-solved-ajax-php-php-based-question-though/ Share on other sites More sharing options...
cooldude832 Posted December 11, 2007 Share Posted December 11, 2007 if the ip adderss of the server DOESN"T match the ip of the remote host prevent it from executing use the $_SERVER var to achieve this Link to comment https://forums.phpfreaks.com/topic/81210-solved-ajax-php-php-based-question-though/#findComment-412089 Share on other sites More sharing options...
play_ Posted December 11, 2007 Author Share Posted December 11, 2007 thanks Link to comment https://forums.phpfreaks.com/topic/81210-solved-ajax-php-php-based-question-though/#findComment-412348 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.