Question: Actually,I'm developing a Clinic Management System where in one screen,I need to show Today's Patients which are added in the Queue.  

For this : I've called `DateTime.Now;`  

Actually My host server is in Canada Location and I'm in Malaysia.So,there is a 12 hour gap between both and the records are not showing until 12 pm.  

While googling for the solution,I came across a solution through JavaScript.

```
 <label id="lblTime" runat="server" style="font-weight: bold"></label> 

 <script type="text/javascript">
        $(document).ready(function () {
            ShowTime();
        });

        function ShowTime() {
            var dt = new Date();
            document.getElementById("lblTime").innerHTML = dt.toLocaleTimeString();
            window.setTimeout("ShowTime()", 1000); // Here 1000(milliseconds) means one 1 Sec  
        }
    </script>

```

Actually,It is showing time but when I get the text on the code behind,it is giving me an empty string.

```
string strrr = lblTime.InnerHtml.ToString();

```

Can anyone guide me through this?
Am I doing any Mistake?
Is there any other way to do this?

Actually,I need the Date&Time in `!isPostback` of `Page_load`

Answer: 
Yes, there is:

```
header('Location: members.php');
exit;

```

Remember to include the `exit` so that your code stops running even if there is a problem processing the header.

Also note, this needs doing before any output is made whatsoever.

<http://php.net/manual/en/function.header.php>

```
<?php
if(isset($_POST['user'])){
    $user = sanitizeString($_POST['user']);
    $pass = sanitizeString($_POST['pass']);
    $pass_hash = md5($pass);

    if ($user == "" || $pass == ""){
        $error = "Not all fields were entered<br />";
    }else{
        $query = "SELECT user,pass FROM members WHERE user='$user' AND pass='$pass_hash'";
        if (mysql_num_rows(queryMysql($query)) == 0){
            $error = "<span class='error'>Username/Password  invalid</span><br /><br />";
        }else{
            $_SESSION['user'] = $user;
            $_SESSION['pass'] = $pass;
            header('Location: members.php');
            exit;
        }
    }
}

include_once 'header.php'; //Any output must be after your header code
echo <<<_END
<form method='post' action='login.php'>$error
<span class='fieldname'>Username</span><input type='text' maxlength='16' name='user' value='$user' /><br />
<span class='fieldname'>Password</span><input type='password' maxlength='16' name='pass' value='$pass' />
_END;
?>

<br />
<span class='fieldname'>&nbsp;</span>
<input type='submit' value='Login' />
</form><br /></div></body></html>

```

BTW - I have not checked any of your code except that which I mention above
At the point where you have the die() line, you can do this

```
ob_clean();
header('Location: http://www.example.com');
exit;

```