function showPrice(str) { var xmlhttp; if (str=="") { document.getElementById("txtHint").innerHTML=""; return; } if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else {// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 && xmlhttp.status==200) { document.getElementById("txtHint").innerHTML=xmlhttp.responseText; } } xmlhttp.open("GET","includes/price.php?q="+str,true); xmlhttp.send(); }
$q=$_GET["q"]; $dbConnect = mysql_connect ($dbHost, $dbUser, $dbPass) or die ('MySQL connect failed. ' . mysql_error()); $sql = "SELECT * FROM pfase_server, pfase_settings, pfase_payment WHERE payment_id = $q";
W <div id=#txtHint> wyświetla mi się cena, która jest zależna od wyboru w select. Moim celem jest wyświetlenie ponowne ceny, oraz numeru z bazy (id select = id ceny i numeru) tylko w innej postaci, tzn. nie "Cena za SMS: <span>".$row['payment_price']."zł</span> z VAT".
Proszę o pomoc.