Jump to content

how to call php function from html


chirdeep_tomar

Recommended Posts

I want to populate data in one combo box depending upon the previously selection made in last combo box.

I have my first combo box which contains 3 channel names. Now, I want to get the serial names for the channel selected by the user in first Combo box ie. channel combo. In short data in second combo shuld be relative to selection made in first combo.

I m using ONBLUR() or ONCHANGE() event in html <Select> statement.... please guide me how to call php function to retrive data(serial names) from the database, so that i can put serial names in serial combo box.
Link to comment
Share on other sites

You cannot call PHP functions from HTML. PHP oly runs when ever you go to the page. PHP is not like javascript where you can call javascript from HTML. What you'll want to do is look into AJAX where you can use HTML/Javascript to call a PHP function when on the web page.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.