I'm new to PHP. i am trying to create some html code within a php function as below.
$str .="</div>
                <div class='cls_setpadding'>
                    <form method='get' action='homepage.php'>
                    <div class='cls_caller_options'>
                        <select name='test'>
                            <option value='allcaller'>".getResourceStrings('msg_allcaller',$lng)."</option>
                            <option value='specialcaller'>".getResourceStrings('msg_splcaller',$lng)."</option>
                        </select><br />
                    </div>
                    <div class='cls_msg_splcaller'>";
        $str .=      getResourceStrings('msg_spcallaer',$lng);          
        $str .="    </div>
                    <div style='padding-top:2%'></div>
                    <div class='cls_search_box'>
                    <input type='hidden' name='function' value='Buysuccess' />
                    <input type='hidden' name='vcode' value='".$vcode."' />";
                    if($testmsisdnheader != ""){
                        $msisdn_header = getheader();
                        $str .="<input type='hidden' name='".$msisdn_header."' value='".$msisdn."' />";
                    }
        $str .="    <input type='text' onkeydown='return ( event.ctrlKey || event.altKey 
                    || (47<event.keyCode && event.keyCode<58 && event.shiftKey==false) 
                    || (95<event.keyCode && event.keyCode<106)
                    || (event.keyCode==8) || (event.keyCode==9) 
                    || (event.keyCode>34 && event.keyCode<40) 
                    || (event.keyCode==46) )' name='cbsmsisdn' maxlength='12' disabled='true'/><br />
                    <div style='padding-top:1%'></div>
                    <input type='submit' value='Submit' /><br />
                    </div>
                </form>
            </div>";
Now I want to enable/disable the text box on the basis of value selected in drop down.
Here i like to put a condition where if the option value equals 'allcaller' the text box should be disabled which is actually happening. But I want to enable the same text box in case option value equals to 'specialcaller'.
I wasn't able to enable the text box on the basis of value selected in drop down.
Any help would be highly appreciated.
Thanks! Bobby.