On Dropdown Selection, how to fill complete form fields from Database

前端 未结 2 358
耶瑟儿~
耶瑟儿~ 2021-01-03 08:41

How to fill the complete form input fields from Database based on the value selected from the Dropdown

Example: In a Application, by selecting a client name it fills

2条回答
  •  攒了一身酷
    2021-01-03 09:02

    This is a just a basic jQuery example that calls itself (the top portion of the script is active when a $_POST is made), which I have named index.php as indicated in the url of the jQuery AJAX. You can use two separate pages to do this if you want. Just separate out the PHP from the HTML/Javascript and change the url: '/index.php':

    '123-12313',"email"=>'test@test.com','city'=>'Medicine Hat','address'=>'556 19th Street NE'));
        // Exit probably not required if you
        // separate out your code into two pages
        exit;
    }
    ?>
    
    

提交回复
热议问题