Because giving through session variables don't work I would like to try session ids.
This is my idea
1. Login page with form to fill out username and password (no session_start(); ), directed to home.php
<?php session_start(); $username = $HTTP_POST_VARS['userName']; // this is correct! $id=$username; ?> <html> <body> <a href="recomm.php?<?php echo $id?>">Link</a>
session_start();here I need the username of the user logged in. So I thought that I could use the variable $id...
However, this variable is now empty.
What do I do wrong?