phpsql1 Posted May 24, 2007 Share Posted May 24, 2007 I do have this button <input type="button" name ="next" onclick=""> for the onclick event I wanna run a php file called next.php. I tried <input type="button" name ="next" onclick="<?php include('next.php');?>"> and <input type="button" name ="next" onclick="<?php run('next.php');?>"> but none of them worked. any ideas Quote Link to comment https://forums.phpfreaks.com/topic/52844-solved-php-file-in-onclick-event/ Share on other sites More sharing options...
taith Posted May 24, 2007 Share Posted May 24, 2007 no... php is serverside... if you want php to work onclick(), you need ajax. Quote Link to comment https://forums.phpfreaks.com/topic/52844-solved-php-file-in-onclick-event/#findComment-260896 Share on other sites More sharing options...
phpsql1 Posted May 24, 2007 Author Share Posted May 24, 2007 thanks I just solved it by using changing the button to accept. Quote Link to comment https://forums.phpfreaks.com/topic/52844-solved-php-file-in-onclick-event/#findComment-260900 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.