Re: Function calling from url

From: Date: Sat, 06 Sep 2003 17:25:32 +0000
Subject: Re: Function calling from url
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-161861@lists.php.net to get a copy of this message
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&parameter2=y " etc...>
Well, you're not going to call a function that way, but you will submit the form to the PHP page (PHP_FILENAME) and that page can call the function. If the action attribute was script.php?p1=x&p2=y Then script.php would have function_name ($_GET['x'], $_GET['y']); You'll probably want to do some validity checking on the GET data, just in case. Hope that helps, Larry PS Just to be clear: you can't call a PHP function using a form since a form is on the client and PHP is on the server.

« previous php.general (#161861) next »