I didn't know that you could add the PHP values directly into the jscript like that, pretty cool.
Edit: It works once I add in the PHP
Only thing;
In IE7 it shows once in FireFox it shows all the time after a page refresh/reload.
Any ideas there?
Edit: FIXED!!! Changed GET to POST
The code from the get_count.php is this;
PHP Code:
<?php
$sql = "SELECT COUNT(*) AS count FROM comments WHERE id = '$_GET[id]'";
$result = mysql_query($sql);
if($result){
$row = mysql_fetch_row($result);
$count = $row[0];
echo $count;
} else{
echo "Err";
}
?>
Edit:
This is so unbelievable
THANK YOU!!!
WOW how cool is this!