lewashby Posted January 3, 2016 Share Posted January 3, 2016 If I have a php file that generates an html form from another php file which file would be the default file that would try to execute if I leave the action field blank in the html form? The php file that the form sits in or the php file that it's called from? Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/300127-form-action-php-script/ Share on other sites More sharing options...
benanamen Posted January 4, 2016 Share Posted January 4, 2016 Why would you even create such a cluster <?=str_rot13("shpx"); ?> ? Quote Link to comment https://forums.phpfreaks.com/topic/300127-form-action-php-script/#findComment-1529051 Share on other sites More sharing options...
Solution Jacques1 Posted January 4, 2016 Solution Share Posted January 4, 2016 (edited) The effective form action is determined by the browser, and the browser doesn't know anything about PHP or how you've organized your scripts on your server. If there's no explicit action, the form data is sent to the document's address which may or may not point to the script which was original called. Edited January 4, 2016 by Jacques1 Quote Link to comment https://forums.phpfreaks.com/topic/300127-form-action-php-script/#findComment-1529053 Share on other sites More sharing options...
ginerjm Posted January 4, 2016 Share Posted January 4, 2016 In the time it took for you to post this query and to get a response you could have just entered the desired script name in the action attribute of your form tag. Quote Link to comment https://forums.phpfreaks.com/topic/300127-form-action-php-script/#findComment-1529074 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.