Sorry to sound rude, firstly have you searched im sure a similar topic has come up before, I also think although your starting out to start getting familiar with the PHP Manual.
Anyway
Have you looked at either [man]empty[/man] or [man]isset[/man] the latter is more to check if the variable exists (is set hence the name) and the other (empty well i think that speaks for itself)