Re: Re: Calling functions from Button actions

From: Date: Sun, 14 Sep 2003 22:10:33 +0000
Subject: Re: Re: Calling functions from Button actions
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-162579@lists.php.net to get a copy of this message
I dont use it. Its just an example. Thanks anyway. Daniel "Marek Kilimajer" <kilimajer@webglobe.sk> escreveu na mensagem news:3F6481AA.6050206@webglobe.sk... > I hope you don't use this method. It is VERY unsafe. You execute ANY > function that the user tells you. > > Daniel Souza wrote: > > <? > > function func1() > > { > > } > > function func2() > > { > > } > > function func3() > > { > > } > > function func4() > > { > > } > > function func5() > > { > > } > > > > if (isset($_REQUEST['funcs'])) > > foreach ($_REQUEST['funcs'] as $key=>$val) > > if (function_exists($key)) > > $key(); > > ?> > > <hr> > > <form method=POST> > > <input type=submit name=funcs[func1] value="Execute Function 1"><br> > > <input type=submit name=funcs[func2] value="Execute Function 2"><br> > > <input type=submit name=funcs[func3] value="Execute Function 3"><br> > > <input type=submit name=funcs[func4] value="Execute Function 4"><br> > > <input type=submit name=funcs[func5] value="Execute Function 5"><br> > > </form> > >

« previous php.general (#162579) next »