faqts : Computers : Programming : Languages : PHP

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

6 of 11 people (55%) answered Yes
Recently 5 of 10 people (50%) answered Yes

Entry

Is it possible to call a php function by using a hyperlink onclick event?

Feb 21st, 2007 04:19
Articles Hosting, Jason Benson, silpa raghavarapu,


The short answer is no.
PHP is a Server Side language and Javascript is commonly implemented 
as 
a Client Side language.
The two usually cannot (and should not) meet.  
That said, depending on what you want to do you could use AJAX to 
better integrate your Javascript with your Server Side coding.
A good article I've found on the subject is here, however a google 
search for AJAX will yield a wealth to explore.
http://www.phpbuilder.com/columns/kassemi20050606.php3
Hope that helps,
JB
=====
i think you cannot.
http://americanahost.com
http://www.qwesz.com