Option field in HTML with PHP

前端 未结 1 1935
广开言路
广开言路 2021-01-28 14:17

I want to search employee list depend on area name which is selected from dropdown list. I can retrieve names of areas from database into dropdown list from PHP HTML. But now I

1条回答
  •  花落未央
    2021-01-28 14:59

    To start, you would have to add a form tag and post the form to another php script.

    Your selected option will be available in either $_POST or $_GET depending on the method used to send the form.

    Example:

    
      
    // your code

    And in your_second_php_script.php:

    
    

    If you need the results to be available in the original page, you can use ajax to get that working, but I would start with the basics.

    0 讨论(0)
提交回复
热议问题