Hi, I would like to retrieve information from my database using ajax in jquery. I googled this but I have not found a tutorial for exactly what I am trying to do. (also, many of them had asp.net or C# in them, which I am not familiar with yet)
I know how I would normally retrieve info from the database with php: (example)
$query = "SELECT name FROM submenus WHERE id=" . $id;
$result = mysql_query($query, $conn);
confirm_query($result);
while ($row = mysql_fetch_assoc($result)){
$name = $row['name'];
}
but if you want this to change each time according to an item being clicked the page would have to reload. I would like to display information (details) next to an image (according to the image that is clicked) without the page reloading.
Can anyone tell me a real SIMPLE way of retrieving data from a database or know of a good tutorial for this (jquery/ajax/php)?
Our community of experts have been thoroughly vetted for their expertise and industry experience.
The Distinguished Expert awards are presented to the top veteran and rookie experts to earn the most points in the top 50 topics.