Re: Calling functions from Button actions

From: Date: Sun, 14 Sep 2003 01:34:28 +0000
Subject: Re: Calling functions from Button actions
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-162537@lists.php.net to get a copy of this message
wont they both be set ? i generally use a button type and onclick document.location.href to enforce an action in the get variable like something.php?action=something > Example: > > <form action="action.php"> > <input type="submit" name="action1" value="Execute function > action1()"> > <input type="submit" name="action2" value="Execute function > action2()"> > </form> > > action.php: > function action1() { > echo "Hello, I'm action1"; > } > > > function action2() { > echo "Hello, I'm action2"; > } > > if(isset($_GET['action1'])) { > action1(); > } > if(isset($_GET['action2'])) { > action2(); > } > > > Dan J. Rychlik wrote: >> Is their an easy way to call a function based upon a button action? >> >> -Dan > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.general (#162537) next »