My database detail unable to display in php
<p>This is my code is display my database (member_details) after user sign up but in the database i have a row which is being injected with javascript. </p>

<pre><code>    &lt;script&gt;window.location="http://google.com"&lt;/script&gt;
</code></pre>

<p>it redirect user to google.com when i view the script in browser.  </p>

<pre><code>    &lt;?php
      session_start();
      include ('includes/database_connection.inc.php');
    $conn = connectDatabase();

      if($_SESSION['uid'] == ''){
        // redirect unauthenticate user to login page.
      header('Location: login.php');
      }

      if($_GET['task'] == 'delete' &amp;&amp; $_GET['id'] != ''){
          // delete function here
         $sql="DELETE FROM Newest Where ID='".mysql_real_escape_string($_GET['id'])."'";

         mysql_query($sql,$conn);
         header('Location: member_list.php');
      }

      if($_POST['Logout']){
         session_destroy();
       header('Location: login.php');
    }

    ?&gt;

    &lt;html&gt;&lt;head&gt;&lt;title&gt;Member Details&lt;/title&gt;
    &lt;/head&gt;
    &lt;body&gt;
    &lt;div style=" margin: 350px "&gt;
    &lt;?php


          $sql="SELECT * FROM Newest";
          $rs = mysql_query($sql,$conn)
            or die( mysql_error() );


       $list = "&lt;table border=\"1\" cellpadding= \"2\"&gt;";
       $list .= "&lt;tr&gt;&lt;th&gt;First Name&lt;/th&gt;";
       $list .="&lt;th&gt;Last Name&lt;/th&gt;";
       $list .= "&lt;th&gt;User Name&lt;/th&gt;";
       $list .= "&lt;th&gt;Email&lt;/th&gt;";
       $list .= "&lt;th&gt;Edit User&lt;/th&gt;";
       $list .= "&lt;th&gt;Delete User&lt;/th&gt;";
        $list .= "&lt;th&gt;Change Password&lt;/th&gt;";


    While( $row = mysql_fetch_array($rs) ) {

        $list .= "&lt;tr&gt;";
        $list .= "&lt;td&gt;".$row["name"]."&lt;/td&gt;";
         $list .= "&lt;td&gt;".$row["last"]."&lt;/td&gt;";
        $list .= "&lt;td&gt;".$row["user"]."&lt;/td&gt;";
        $list .= "&lt;td&gt;".$row["email"]."&lt;/td&gt;";
        $list .= "&lt;td&gt;&lt;a href='member_details.php?id=".$row['ID']."'&gt;Edit&lt;/a&gt;&lt;/td&gt;";
        $list .= "&lt;td&gt;&lt;a onclick='return confirm(\"Are you sure to delete ".$row["name"]." \")' href='member_list.php?id=".$row["ID"]."&amp;task=delete'&gt;Delete&lt;/a&gt;&lt;/td&gt;";
         $list .= "&lt;td&gt;&lt;a  href='Password.php?id=".$row['ID']."'&gt;Click Here&lt;/a&gt;&lt;/td&gt;
         &lt;/tr&gt;";

    }
       $list .= "&lt;/table&gt;";
       echo ( $list );

    ?&gt;
       &lt;form method="post" action="member_list.php"&gt;&lt;br&gt;
       &lt;div style="margin : 0px 600px"&gt;
       &lt;style type="text/css"&gt;
    body {background:#F5F5F5 url('http://images.apple.com/downloads/dashboard/travel/images/traveltodolist_20070724165034.jpg') no-repeat top;;

           }&lt;/style&gt;


             &lt;input type="submit" name="Logout" value="logout" /&gt;

          &lt;/form&gt;
    &lt;/body&gt;
    &lt;/html&gt;
</code></pre>
