session data is not pass (php)
<p>i have created a session after my login page and wanted to redirect to a secure page with session i created earlier.. but my session data is not pass.. may i know wat is the problem..</p>

<p>php session: </p>

<pre><code>    $em = $_POST['email'];
$pw = $_POST['password'];
$em = mysql_real_escape_string($em);
$pw = mysql_real_escape_string($pw);
$query = "SELECT * FROM Register WHERE email = '$em' AND pass = '$pw'";

$result = mysql_query($query) or die("Unable to verify user because : " . mysql_error());  

if (mysql_num_rows($result) &gt; 0) {

session_start();
// store session data
$_SESSION['login']=$em;

//echo 'Connected';
// Jump to secured page
echo "&lt;script&gt;window.location='http://example.com/secure.php'&lt;/script&gt;";
}
</code></pre>

<p>the page i redirected to:</p>

<pre><code>   &lt;?php session_start(); $_SESSION['login']; ?&gt;
   &lt;p&gt;Welcome 
   &lt;?php
   //retrieve session data
   echo $_SESSION['login'];
   ?&gt; 
   to M-Cloud&lt;/b&gt;
</code></pre>
