<!DOCTYPE html>
<html>
<head>
<script type="text/javascript">
function updateBids() {
var url="getprice.php?auc=<?php echo $id; ?>";
jQuery("#priceElement")<strong class="highlight">.load</strong>(url);
}
<strong class="highlight">setInterval</strong>("updateBids()", 1000);
</script>
</head>
<body>
Here is the price: <div id="priceElement"></div>
</body>
</html>
<?php
// Anything printed on this page will be loaded into the priceElement <div>
include ('db.php');
$id = $_GET['auc'];
$getprice = mysql_query("SELECT b_currentprice FROM bid WHERE auction_id = '$id' ORDER BY b_timestamp DESC");
$resultprice = mysql_fetch_assoc($getprice);
$price = $resultprice['b_currentprice'];
echo $price;
?>
dit moet elke seconde de nieuwe database informatie echo'en maar ik heb het geprobeerd en krijg als ik het script zelf aanroep gewoon de echo terug maar niet in de priceElement.
iemand enig idee hoe dit kan?