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
https://forums.phpfreaks.com/topic/32721-how-to-call-php-function-from-html/
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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.