This is my HTML Code
[code] <select name="subject" id="subject" class="form-control">
<option value="0">-Select-</option>
<option value="1">Investigate</option>
<option value="2">Mobile Lost</option>
<option value="3">Lost something else</option>
</select>[/code]
So, In case the user selects value 2, an extra text box appears and the user has to enter the IMEI number.
I’ve used Jquery to display that div on subject value selection.
[code]$(’#subject’).on(‘change’, function(){
if ($(this).val() == 1 ) {
$(’#inv’).removeClass(‘hide’);
$(’#lost’).addClass(‘hide’);
}
if ($(this).val() == 2 ) {
$('#inv').addClass('hide');
$('#lost').removeClass('hide');
}[/code]
Inside PHP code I’ll be having
[php]
$subject=$_POST[“subject”];[/php]
So just tell me how I should modify the PHP so that it sends the IMEI value on that subject selection (mobile Lost or value “2”) else it’s just the subject.