<p>I want to get user input in one page, store that in a php variable and use it in another php page. I have tried using 'sessions' but it doesn't seem to be working. Is there another safe alternative? This information is likely to be usernames and passwords.</p>

I Agree with carson, sessions should work for this.  Make sure you are calling
session_start()
before anything else on any page you want to use the session variables.
Also, I would not store password info directly, rather use some kind of authentication token mechanism.  IMHO, it is not
intrinsically
unsafe to store password data in a session, but if there is no need to do so, you should probably try to avoid it.