Dobakat Posted April 26, 2006 Share Posted April 26, 2006 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[code] $user=$_POST['user'];[/code]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:register3.php?var1=$random&var2=$userbut 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. Quote Link to comment Share on other sites More sharing options...
PWD Posted April 26, 2006 Share Posted April 26, 2006 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:<?phpecho $_SESSION['Data1'];?> Quote Link to comment Share on other sites More sharing options...
Dobakat Posted April 26, 2006 Author Share Posted April 26, 2006 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.