2011/2/14 Paul Halliday <[email protected]>:
> if (isset($_POST['botton1'])) {dothing1();}
> if (isset($_POST['button2'])) {dothing2();}
Hello.
in html:
<input type="submit" value="Update" name="op">
<input type="submit" value="Checkout" name="op">
in PHP
if(isset($_POST['op'])){
switch($_POST['op']){
case 'Update':
dothing1();
break;
case 'Checkout':
dothing2();
break;
default:
dohatehackersfunction(':)');
break;
}
}
PS: Don't use multiple input type="image" buttons - all IE's don't
send value attribute in POST - use CSS
--
WBR, Dmitrii
+375 29 60-LINUX, 25-LINUX, 40-LINUX
icq: 193-74-771
www.varvashenia.ru, www.seoder.ru
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php