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?

99 of 147 people (67%) answered Yes
Recently 5 of 10 people (50%) answered Yes

Entry

I want to call a user defined PHP function on buttons event like onClick. How can i do that ?

Mar 19th, 2008 22:20
ha mo, Chris Hayes, Mrunal Buch,


PHP is done on the server and send as a completed page to the browser.
There is no interaction with the user.  
onClick is detected on the browser.
The only thing you can do is load a new PHP page when the user has
clicked  something. You can pass on GET variables if you want: <input
type=button
onclick="document.location.href='http://www.site.org/page.php?var1='+var1+'&var2='+var2">
http://www.tantofa.com
http://www.fantofa.com
http://www.mantofa.com
http://www.tanpola.com
http://www.tampola.com
http://www.yamot.com
http://www.mozmar.com
http://www.templatestemp.com