How do I execute a PHP query on select option choice using AJAX?

前端 未结 3 1919
暖寄归人
暖寄归人 2020-12-05 09:02

Okay I know this has been answered before (Execute PHP script on same page after selecting a dropdown list option using Ajax or JavaScript) but the answers weren\'t very hel

3条回答
  •  孤城傲影
    2020-12-05 09:21

    Check this simple tutorial Hope this will help.

          
        
        
        
        
    
        

    Person info will be listed here...

    The getuser.php file

       
        
        
        
        
        
    
        
        
        Firstname
        Lastname
        Age
        Hometown
        Job
        ";
        while($row = mysqli_fetch_array($result)) {
            echo "";
            echo "" . $row['FirstName'] . "";
            echo "" . $row['LastName'] . "";
            echo "" . $row['Age'] . "";
            echo "" . $row['Hometown'] . "";
            echo "" . $row['Job'] . "";
            echo "";
        }
        echo "";
        mysqli_close($con);
        ?>
        
        
    

提交回复
热议问题