Re: PHP Reference
| From: | Karl DeSaulniers | Date: | Sun, 15 Aug 2010 00:08:07 +0000 |
| Subject: | Re: PHP Reference | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-307477@lists.php.net to get a copy of this message | ||
Thanks tedd.
On Aug 14, 2010, at 7:45 AM, tedd wrote:
At 1:08 AM -0500 8/14/10, Karl DeSaulniers wrote:Karl DeSaulniers Design Drumm http://designdrumm.comHello all, I was wondering, can you reference php in a url string like you can javascript. EG: "javascript:someFunction()" Can you do something similar in php like "php:someFunction()" I am thinking that you can not do this, but was wondering if there was something like that. Thanks,Karl: As others have answered, no php doesn't work that way. However, you can still send/receive strings through a url via a $_GET) and direct the actions of a receiving php script and you can do the same thing via a $_POST. As such, a "php:someFunction()" could be a: url?php=someFunction Where the receiving script takes the command and runs someFunction(). However, I would shorten it a bit and say url?php=18 Where php would be the command to run a function and 18 would be the function you want to run. So, while you can't use the same syntax as javascript, you can get the same performance. Cheers, tedd --------- http://sperling.com/