delickate Posted May 20, 2008 Share Posted May 20, 2008 hi, i'm using <a href="next.php"> i would like to call php fuction on its click like <a href="next.php" onClick="<? change(); ?>" >go</a> <? function change() { a=a+b; } ?> i tried but it is not working. any can help me plz Link to comment https://forums.phpfreaks.com/topic/106432-help-in/ Share on other sites More sharing options...
DarkWater Posted May 20, 2008 Share Posted May 20, 2008 PHP cannot do a thing after the page has been sent to the browser, therefore not being able to be used in onClick handlers. Javascript can though. You should read up on what PHP is and what it isn't. Link to comment https://forums.phpfreaks.com/topic/106432-help-in/#findComment-545536 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.