I have this: <?php if (trim($_SESSION['nowtoctype']) == 'thistype') {print '<a href="page1.php">page1</a>';}else{print '<a href=" page2.php">page2</a>';} ?> I will get the error: Notice: Undefined index: nowtoctype in ... If the variable has not yet been defined... Is there a way to check if this var is already defined? ... (and then I can define it - if not) -- Thanks - RevDave Cool @ hosting4days . com [db-lists] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php