another way is to do eval () on $function but that kinda stuff is really bad
for security.  Also bad to get carried away with making one file that passes
tons of different function names so your whole website's in one file :)
There should be some criminal punishment for doing that.

-----Original Message-----
From: Shrout, Ryan [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 11, 2001 10:16 AM
To: 'Geer'; [EMAIL PROTECTED]
Subject: RE: [PHP] Function call from a hyperlink


Why not just pass a variable: <a href="file.php?function">

and then in the PHP file do:

if ($function) {
        function();
}

Ryan Shrout
Amdmb.com

-----Original Message-----
From: Geer [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 11, 2001 1:17 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Function call from a hyperlink


Hi,

Does someone know how I can call a function in a PHP script using a
hyperlink with
<A HREF=.....>text</A>

The function is in the same PHP script as the link.


Many thanks,

Geer



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to