using header function to redirect
<p>I'm new to programming in PHP. Kindly bear me...</p>

<p>when using header function, refresh option is not working when using variable from post method(dynamically).  when hard-coded the number its working. I tried different options. You can see my whole code here.not succeeded to make refresh work dynamically. Can someone help?</p>

<pre><code>&lt;?php
if($_POST['time']&gt;0) {
     $t = $_POST['time'];
     $u =$_POST['url'];
     echo "You will be redirected to the " .$u . " website in " .$t. "seconds";
     //header("refresh:5; url=http://www.google.com");

     //header("refresh:($_POST['time']);url=($_POST['url'])"); 
     header('refresh: ' .$t);
     header('Location: '.$u);
     exit;       
}
?&gt;
</code></pre>
