I'm using cookie to communicate between .net and php application.
I'm able to retrieve cookie value using php and the cookie is set using .net
So in both files, i can view the cookie values.

What i want to do now is.

If the user is logged in using aspx application, then he is allowed to view the php pages(using cookie).
If not logged in, they will be redirected to aspx page.

Here is the code

```
if (!isset($_COOKIE["AuthoerCode"])){
   header("Location:login.aspx");
}else{
  header("Location:dashboard.php");
}  

```

The above if conditions works perfect but the else part is not working and I'm getting this error.

```
The page isn't redirecting properly(Firefox)

```

In other words, i need to check in my dashboard.php page whether the cookie is set or not - If set, view the dashboard.php else view the login.aspx 

Where is the problem now?