I have select option $titles=array(' select ','Mr','Miss',' Mrs');
the default value is (select)if i dont change the title from select into Mr or Mrs and click on submit button i get the default value which is Select then i should have error message but it does not occur. Can anyone help?
Code:
if(isset($_POST[$v[1]] )){
$initvalue=$_POST[$v[1]];
}else{$initvalue='';}
echo '<td><select name ="titl">'."\n";
foreach($titl as $value){
echo '<option value="'.$initvalue .'">' . $value .'</option>'."\n";}
if(!isset($_POST['titl'])){
$errormsg.='please select your title.';}
echo'</select></td>'."\n";
Comment