How do I keep the user logged into my website when they switch pages using PHP POST without a form?

Maybe like this (I am aware that this code might be a little crazy):

```
<?php
  define (php_post_request, (name), (Werling));
  header ('Location: ' . $_GET["location"], php_post_request);
?>

```

Any help would be appreciated.