Ok, this one is taking me some time now, I've read other topics and cannot seem to solve it.
I have a select populated with a PHP function article_search() that retrieves all article names from a the table article in my DB
<select id="article_select">
<?php
$article_group = article_search();
foreach($article_group as $item) {
echo "<option value=\"{$item["idArt"]}\">{$item["name"]}</option>";
}
?>
</select>
What I need is, when the user selects an article, an AJAX function search the field price from the table article in the database and puts the result in this element:
<p>Price:
<input type="text" class="details" id="price" name="price">
</p>
Needless to say that I have no experience in AJAX, but it seems like the only solution at these point.
Every bit of help would be appreciated.