Where the probem in this code (javaScript).........?????
- by user318068
Hi
Ihave a problem in my code.
can anybody help me ...
<html>
<body>
<script type="text/javascript">
<?php
$conn = mysql_connect("localhost","root");
mysql_select_db("tr", $conn);
$q = mysql_query("SELECT message FROM messages WHERE to_viewed = '0' ");
if (mysql_num_rows($q)) {
require('pm.php');
?>
var answer = confirm("you have new message ");
<?php
}
?>
if (answer) {
window.location = "http:>>>/";
} else {
}
//-->
</script>
</body>
</html>
Thanks ....