undefine variable

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

 



I'm having a problem running a form script. It used to work before, but
now when I submit the form an error pops up and it won't write to the
database:


This is the error:

[Sun Aug 17 16:46:54 2008] [error] [client 127.0.0.2] PHP Notice:
Undefined variable: selected_state
in /srv/www/htdocs/djtommer/contact.php on line
243                                            


This is the code:
-------------

foreach($state_list as $key=>$value){
if($selected_state == $key){
$sel = 'selected="selected"';
}
else{
$sel = '';
}
echo "<option $sel value=\"$key\">$value</option>";
}
echo '</select>';
?>

----------


-- 
Michael S. Dunsavage


-- 
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