PDA

View Full Version : Javascript calling PHP function



beyondthegrave
24 Oct 2007, 09:58 AM
Can Javascript call a PHP function?
eg.
<a onclick="myphpfunc()">Click me</a> ?

Thanks for any help you can offer.

247SiteAlert
26 Oct 2007, 04:02 PM
No. JS is a client-side scripting language. PHP is a server-side scripting language. Best thing to do is have your JS call a .php script to execute on the server side.