I would like to call a function from a <FORM>'s ACTION attribute. This is what I'm trying to do:
<FORM ACTION="www.example.com/PHP_FILENAME/function_name?parameter1=x¶meter2=y " etc...>
I can include the PHP_FILENAME but passing parameters to the function I can't figure out how to do. Any help would be appreciated.
Ummm... no. You call a PAGE from the action attribute of a form. There is no getting around that. You can call a PHP PAGE that passes variables in the query string, though...
action="www.example.com/phpfile.php?function=foo¶m1=bar¶m2=baar
This would give you $_GET['function'], $_GET['param1'], and $_GET['param2'] in your "phpfile.php" page. You then call your function using those variables. If you are smart, you'll put in some validation, also.
-- ---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
php|architect: The Magazine for PHP Professionals – www.phparch.com
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php