Introduction
In this article I explain Get data from MySQL using jQuery with PHP. I am using a simple HTML form and a JavaScript function with a MySQL table for creating this phenomenon. Such that the user enters a name and fetch your table user enter name correct or not.

First of all, create a new database and table in your MySQL and insert some data. Such as:

Then create a HTML form for displaying the data, such as:
<html>
<head>
<title>Untitled Document</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script type="text/javascript">
function get() {
$('#age').hide();
$.post('data.php', { name: form.name.value },
function (output) {
$('#age').html(output).fadeIn(1000);
});
}
</script>
</head>
<body bgcolor="#B096FE">
</p>
<form name="form" method="post">
<input type="text" name="name">
<input type="button" value="get" onclick="get();">




Join the conversation! Your thoughts help the community grow.