Where the probem in this code (javaScript).........?????
Posted
by user318068
on Stack Overflow
See other posts from Stack Overflow
or by user318068
Published on 2010-04-15T23:23:49Z
Indexed on
2010/04/15
23:33 UTC
Read the original article
Hit count: 159
JavaScript
|php
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 ....
© Stack Overflow or respective owner