Jump to content


This topic is now archived and is closed to further replies.


Help needed~ variables.

Recommended Posts

Well I got a site were you can register. To register there are 3 steps. In the first step you only submit a disired and you click a button to go to next page, which is step#2. In the second page the username that was inputted in the first page is gotten using
and then it generates a random string using [code]  $random = $session->generateRandStr(8)[/code] and stores it variable $random,
After the page is loaded, they click a button again to go to next page, step #3.
Here is were the problem starts. I want to pas the two varibles to page 3. the variabes are:
$user (varible gotten from a form in page one, it worked fine in page 2)
$random (a variable generated each time the second page is loaded)

I tried carrying the variables in the url using:
but it fail to get them in the third page, I also tried ussing hidden variables, but when I tried to get them in page 3 I got an error:
Parse error: parse error, unexpected T_VARIABLE in /home/dobakat/public_html/members/register3.php

Well can someone help me, please?
If you need the whole code of the 3 pages let me know.

Share this post

Link to post
Share on other sites
You could store the info in a session variable. That way you would only need to use the following to recall those values on ANY page:


echo $_SESSION['Data1'];


Share this post

Link to post
Share on other sites
Well I eddited this reply, since I fixed my problem. I don't even know how. I believe I didn't even change a thing, but it worked.

Share this post

Link to post
Share on other sites


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.