Autofill the textfields when an input is given by user using jquery,ajax

I want to auto populate a form when I input an id. The form should be autofilled with data from the database(MYSQL). I have implemented using the following javascript,javascript but code is not working . Please help


Select mfd type: 101 102 103 104







<?php include 'db_con.php'; $conn = OpenCon(); $drop_mfd = $_REQUEST['drop_mfd']; $mfd_auto_query = mysqli_query($conn,"SELECT * FROM mfd WHERE ID = '".$drop_mfd."'"); $rowss = mysqli_fetch_array($mfd_auto_query); $mtype = $rowss['MFD_Type']; $mmat = $rowss['MFD_Material']; $mvend = $rowss['MFD_Vendor']; $mbatch = $rowss['MFD_Batch']; $mdate = $rowss['MFD_Received_on']; $info = array("$mtype","$mmat","$mvend","$mbatch","$mdate"); echo json_encode($info); ?>

A post was merged into an existing topic: Populate the text fields automatically when id is provided

@vbwaj, stop creating new threads for the same problem. Your post in this thread has been merged with your most recent previous thread. Read and make use of the replies you have already gotten.

Sponsor our Newsletter | Privacy Policy | Terms of Service