 Where the probem in  this code (javaScript).........????? 
Ihave a problem in my code.

can anybody help me ... 


(my code)

    <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 ....


 Where the probem in  this code (javaScript).........????? 
===

Ihave a problem in my code.

can anybody help me ... 


(my code)

    <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 ....

