Re: calling user-defined php functions from <a href> tag
| From: | Brent Baisley | Date: | Mon, 29 Jul 2002 12:25:50 +0000 |
| Subject: | Re: calling user-defined php functions from <a href> tag | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-110153@lists.php.net to get a copy of this message | ||
Actually, this works very similar to Javascript in that you can use javascript to parse the URL and thus read "values" from the previous page. PHP will declare the variables with the values based on the URL, you don't even have to parse it.
If your URL/HREF is like this:
www.url.com/?variable=Value&variable2=Value&variable3=value...
Then on the receiving page, php will have those variables and values declared, just like a form was submitted. I'm sure there is some extra work you will need to if you are using PHP 4.2 with the globals off. I haven't moved up to that version yet.
On Friday, July 26, 2002, at 10:43 PM, Michael wrote:
Basically, I have a php file with dozens of functions in it. I want ONE of them to get called when a link is clicked. Currently, I achieve this with the use of HTML forms. My form generates a list of options. And the user has to select an option, then click the SUBMIT button. --Brent Baisley Systems Architect Landover Associates, Inc. Search & Advisory Services for Advanced Technology Environments p: 212.759.6400/800.759.0577