Jump to content

Help needed~ variables.


Dobakat

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
[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=$user
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.
Link to comment
https://forums.phpfreaks.com/topic/8429-help-needed~-variables/
Share on other sites

Archived

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

×
×
  • Create New...

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.