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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.