Click here to Skip to main content
15,896,456 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,i have a undefined index when I declare my dropdown in php like this

$selectAction = '<select id="compAction" name="compAction" style="font-size: 12px" onChange="actionSelect(),document.redemptionsForm.submit();">';
foreach($arr as $option => $item){
$selectAction .= "<option id='" . $item . "' value='" . $item . "' " .
(($compAction == $item)?'selected':' ') . ">" . $item . "</option>\n";

}
$selectAction.="</select>";


what could the issue be?
Posted
Comments
krumia 17-Feb-12 4:37am    
Try examining the HTML generated by this. That should be easier.
nathan666 17-Feb-12 4:44am    
thanks , sorted this issue out , appreciatte your reply
nathan666 17-Feb-12 4:45am    
It was just a php varaible that was not set
krumia 17-Feb-12 4:46am    
You can mark the question "I've solved it myself" so others wont bother anymore.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900