|
Posted by Curtis on 01/03/07 23:40
Make sure you declare your variables first, especially if
register_globals is on. A client could potentially modify/create
variables and contents arbitrarily.
See: http://php.net/register_globals
On Jan 2, 8:12 am, william <b...@no.spam> wrote:
> On Tue, 02 Jan 2007 05:47:20 -0800, Jeff Vaccaro wrote:
> > How come this doesn't work?
>
> > What am I doing wrong?
>
> > $type = $_GET['functionType'];
>
> > if ($type == 'Add'){
> > $AddSQL = "INSERT INTO...";
> > echo $AddSQL;
> > }elseif ($type == 'Update'){
> > $UpdateSQL = "Update ...";
> > echo $UpdateSQL;
> > }elseif ($type == 'Delete'){
> > $DelSQL = "DELETE FROM ...";
> > echo $DelSQL;
> > }you should make your code more readable (for yourself)
> have a look on switch/case/break.
Navigation:
[Reply to this message]
|