> To make it easier to read and more flexible, I would probably do something
> like:
> 
> $sports_types    = array("football", "basketball", "track");
> $transfer_sports = array("wrestling");
> if (in_array(strtolower($_GET['sports_type']), $sports_types) or 
>     in_array(strtolower($_GET['transfer_sport']), $transfer_sports))
> {
>  # ...
> }
> 
> Now, any way you can populate the arrays will work.  However, you probably 
> want
> to further cleanse the $_GET inputs and perhaps this should be done before the
> if() statements.
> 
> switch...case statements are also useful for this sort of thing.
> 
> James

20080827 1501 GMT-6

I didnt write any of this code James. This is part of a package the school 
district purchased last year or the year before. The company apparently has 
been 
horrific at support so I have been going through trying to fix what I can but 
its very slow and I have to figure out what they were doing to begin with and, 
I 
dont want to drastically change their code in case they actually do come and 
support this.

But yea, there are much better ways of doing what Im fixing :)

Thanks

Wade

Reply via email to