xmlhttp.status==200) { $(‘#newcommentstatus’).HTML+=xmlhttp.responseText; $('#discussion').load("./content/discussion.php?projectid="+projectid +"&discussionid="+discussionid+"&userid="+userid); } } xmlhttp.open("GET","./modules/discussion/newcomment.php ?projectid="+projectid+"&discussionid="+discussionid+"&user ="+user+"&comment="+comment+"&ctime="+ctime,true); xmlhttp.send(); } xmlhttp.open( "GET", "./modules/discussion/newcomment.php? projectid="+projectid+ "&discussionid="+discussionid+ "&user="+user+ "&comment="+comment+ "&ctime="+ctime, true ); $(‘#newcommentstatus’).HTML+=xmlhttp.r esponseText; <?php $projectid=$_GET["projectid"]; $discussionid=$_GET["discussionid"]; $user=$_GET["user"]; $comment=$_GET["comment"]; $ctime=$_GET["ctime"]; echo "Adding comment<br>"; $con = mysql_connect('localhost', 'root', ''); mysql_select_db("nirvana", $con); $tempvar = mysql_query("SELECT firstname FROM users WHERE userid=$user"); $tempvar = mysql_fetch_row($tempvar); $user = $tempvar[0]; mysql_query("INSERT INTO discussion (discussionid, user, comment, time) VALUES ('$discussionid', '$user', '$comment', '$ctime' )"); mysql_close($con); ?>