[clug] need another set of eyes - PHP when no variable is passed

Kristy A. Bennett kristy at kristy.id.au
Thu Mar 30 03:10:41 GMT 2006


It's just one of those days >:o

Okay so here's the dilemma.  I have a page - say index.php which has a 
variable 'menu' to be passed back to itself.  This variable is then used 
to call in flash movie (yeah, yeah I know....).  This part was working 
and but I have since broken it again.  However, the problem does not lie 

I cannot for the life of me work out how to set a default variable if 
one is not passed (eg user goes to index.php as opposed to 

I have tried if(!$menu) {blah} and if ($menu=="") {blah}.  Neither work 
- is there any other solution that I have just simply overlooked?


Another Linux Hacker Production Unit

More information about the linux mailing list