I have a combo box "verb" that displays a field of database .. when the user selects "other" from the drop down ...a div named "choicetext" appears and user enters his choice of verb ....
The below code is of the action page ..in which i want to insert the "choicetext" value in that field of database... but should enter nothing if the user slects from the existing dropdown of "verb"
I succceded to enter the new one .. but whenever the user selects frm existing dropdown .. a blank entry happens in DB ...Plz help me ..thanx in advance
<?php
$verb=$_REQUEST['verb'];
$item=$_REQUEST['item'];
$choice_verb=$_REQUEST['choicetext'];
$verb_category="SRS";
$added_by="";
$added_on=date("Y/m/d");;
$status=1;
if('$choicetext'!="" && '$verb'=="other") {
// Insert data into tb_verb_master
$sql="INSERT INTO tbl_verbs_master(verb_category,verb_description,added_by,added_on,status)VALUES('$verb_category', '$choice_verb','$added_by','$added_on','$status')";
$result2=mysql_query($sql) or die(mysql_error());
}
else {
?????
}