another way would be to use an intermediate script <form action='dispatch.php' method='post' name='frmA"> <input type='submit' value="Button A" name='btnA'> <input type='submit' value="Button B" name='btnB'> <input type='submit' value="Button C" name='btnC'> </form>
in dispatch.php, read the $_POST vars to see which button was clicked, then use Header("Location: ....") to dispatch to the appropriate script a.php, b.php, or c.php Grant wrote: > You can use 3 separate forms: (You can't put forms inside forms...in case > you were going to try that) The only drawback to this method of 3 forms is > that it creates a new line after each form. If you want them on the same > line, then I haven't figured that out yet...if anyeone knows, let me know! > > <form action='a.php' method='post' name='frmA"> > <input type='submit' value="Button A" name='btnA'> > </form> > > <form action='b.php' method='post' name='frmB"> > <input type='submit' value="Button B" name='btnB'> > </form> > > <form action='c.php' method='post' name='frmC"> > <input type='submit' value="Button C" name='btnC'> > </form> > > > > > On Thu, Apr 1, 2010 at 2:59 AM, imran shafiq <jibreel_a...@yahoo.com> wrote: > > >> Dear Experts >> >> How to call different php files using buttons? >> If I have 3 buttons A,B&C and I want to if I press button A the a.php is >> display on screen similarly for button B call b.php and for button C call >> c.php. >> >> Imran Shafiq Khan >> >> [Non-text portions of this message have been removed] >> >> >> >> > > > [Non-text portions of this message have been removed] > > > > ------------------------------------ > > The php_mysql group is dedicated to learn more about the PHP/MySQL web > database possibilities through group learning. Yahoo! Groups Links > > > > > [Non-text portions of this message have been removed]