PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
phpDVWeaver
Forum Commoner
Posts: 28 Joined: Sun Apr 29, 2007 11:00 pm
Post
by phpDVWeaver » Thu May 24, 2007 11:13 am
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
RobertGonzalez
Site Administrator
Posts: 14293 Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA
Post
by RobertGonzalez » Thu May 24, 2007 11:18 am
Moved to PHP - Code.
You are trying to do something client side. PHP is server side. To get what you want, you will either need to link to the PHP app or use Javascript to push the action to a PHP app.
phpDVWeaver
Forum Commoner
Posts: 28 Joined: Sun Apr 29, 2007 11:00 pm
Post
by phpDVWeaver » Thu May 24, 2007 11:29 am
Man I just don't know how did I forget that. that 's the main difference beween javascript and php.
thanks a lot
lanasa
Forum Newbie
Posts: 14 Joined: Mon Mar 26, 2007 7:49 am
Location: Buffalo, NY
Post
by lanasa » Fri May 25, 2007 5:57 pm
Sounds like you're gonna need to use AJAX. Try this tutorial
AJAX and PHP
RobertGonzalez
Site Administrator
Posts: 14293 Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA
Post
by RobertGonzalez » Fri May 25, 2007 6:06 pm
I don't think he's going to need to use AJAX. He can if he wants to, but it isn't required to achieve what he ultimately wants to achieve.
As for the link, that is borderline advertisement, so I'd ask that you keep that to a minimum. Thanks.