Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8358069
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T10:41:01+00:00 2026-06-09T10:41:01+00:00

I’m new to PHP. i am trying to create some html code within a

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T10:41:03+00:00Added an answer on June 9, 2026 at 10:41 am

    I have two possible solutions for you.

    1. As you have mentioned in comment that you dont want to use java script, as its a WAP Portal, but their is no other way to do this without using javascript. I can recommend you a one way where you can ask user to submit his drop down result. And on the basis of that result you can enable or disable you text box on next page.

    2. Otherwise go for javascript.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm trying to create an if statement in PHP that prevents a single post
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have this code to decode numeric html entities to the UTF8 equivalent character.
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
I would like to count the length of a string with PHP. The string
For some reason, after submitting a string like this Jack’s Spindle from a text

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.