Click to See Complete Forum and Search --> : defining an index?


Codeman0013
09-21-2006, 03:49 PM
Hey on one of my projects i keep getting undefined indexes because the user has to select a drop down value first how do i just give it a fake value like test or something ahead of time??

NogDog
09-21-2006, 04:12 PM
We may need more detailed info on the exact situation, but generally speaking you could do something like this:

$value = (isset($_POST['field1'])) ? $_POST['field1'] : "default_value";