Newbie - Undefined Index Variable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux