Click to See Complete Forum and Search --> : PHP script executed by clicking button


dataline
01-04-2007, 12:00 PM
Hi,

Simple question!

I'm learning PHP from a book, while building a site at the same time. In it, it shows that the script aaa.php can be ran by clicking on a button inside a form that has the tag

<form action="aaa.php" method=post>

I have 2 files aaa.php and bbb.php that are to be ran under different circumstances. I'm thinking of having 2 buttons labelled aaa and bbb, which when clicked would ran the 2 scripts. I've done some google, and the examples provided are for javascript. Anyone knows how this is done for PHP!

Thanks!

DL

felgall
01-04-2007, 01:38 PM
<form action="aaa.php" method=post>
<input type="submit" value="Submit aaa.php">
</form>
<form action="bbb.php" method=post>
<input type="submit" value="Submit bbb.php">
</form>