Notice: Undefined variable driving me crazy...

A

Anonymous

Guest
you test if $add == "yes", but where does add get set? Seems like if it's an undefined variable, it is not getting set above the code you put into the msg.

perhaps make your if something like:

if(!empty($add) && $add == "yes") {

that will test to make sure it is set, is not empty and is equal to yes.
 
if you have register_globals set to OFF (as you really should do) in your ini file, you will not be able to address passed variables except through their array collective.

if($_POST['add'] == "yes")

or

if($HTTP_POST_VARS['add'] == "yes")

one of those should do the trick.
 
Back
Top