hi iwant know why this code don’t work with me itry make user buy wood and then update his information in datebase
<html>
<head>
<script language=”javascript” type=”text/javascript”>
<!–
function buy(nomber,ink){
var ajaxRequest; // The variable that makes Ajax possible!
try{
// Opera 8.0+, Firefox, Safari
ajaxRequest = new XMLHttpRequest();
} catch (e){
// Internet Explorer Browsers
try{
ajaxRequest = new ActiveXObject(“Msxml2.XMLHTTP”);
} catch (e) {
try{
ajaxRequest = new ActiveXObject(“Microsoft.XMLHTTP”);
} catch (e){
// Something went wrong
alert(“Your browser broke!”);
return false;
}
}
}
// Create a function that will receive data sent from the server
ajaxRequest.onreadystatechange = function(){
if(ajaxRequest.readyState == 4){
}
}
ajaxRequest.open(“GET”,ink, true);
ajaxRequest.send(‘nomber=’+nomber);
}
nomber=””;
function submitnum(bname){
nomber+=document.getElementById(bname).value+””;
document.getElementById(bname).value=””;
}
//–>
</script>
</head>
<body bgcolor=#CCA37A>
<table align=left width=600>
<tr><td bgcolor=orange colspan=2>Market</td></tr>
<tr><td onmouseover=”this.style.background=’#FECE6E’; ajaxFunction(‘buildinfo.php?type=wood’,’info’);”
onmouseout=”this.style.background=’#CCA37A'”>Wood</td><td><input type=text id=bi><input type=submit onclick=”submitnum(‘bi’);buy(nomber,’buy.php’);”></td><td rowspan=3><div id=info></div></td></tr>
</table>
</td></tr></table>
</body>
</html>