Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Feb 2006
    Posts
    138
    Thanks
    11
    Thanked 0 Times in 0 Posts

    Help getting vars into redirect

    The query below is successful and the first round of "echoes" works fine and displays the proper data. The second echo (of $GOwnerID) and the variables I used in the header() command are not showing... Any suggestions?

    PHP Code:
    $resultsmssql_query($sqlquery);


    $row mssql_fetch_array($results);

    echo 
    $row['OwnerID'];
    echo 
    $row['Code'];
    echo 
    $row['FirstName'];
    echo 
    $row['LastName'];
    echo 
    $row['EmailAddress'];
    echo 
    $row['Password'];
    echo 
    $row['PhoneNumber'];
    echo 
    $row['HomeResort'];
    echo 
    $row['PointsBank'];

    echo 
    $row['OwnerID'] = $GOwnerID;
    echo 
    $row['Code'] = $GCode;
    echo 
    $row['FirstName'] = $GFirstName;
    echo 
    $row['LastName'] = $GLastName;
    echo 
    $row['EmailAddress'] = $GEmailAddress;
    echo 
    $row['Password'] = $GPassword;
    echo 
    $row['PhoneNumber'] = $GPhoneNumber;
    echo 
    $row['HomeResort'] = $GHomeResort;
    echo 
    $row['PointsBank'] = $GPointsBank;

    echo 
    $GOwnerID;

    $num_rows mssql_num_rows($results);


    /*
    if ($num_rows > 0) {

    header( 'Location: http://www.mysite.com/os_redlogin_sesspro.php?OwnerID='.$GOwnerID.'&Code='.$GCode.'&FirstName='.$GFirstName.'&LastName='.$GLastName.'&EmailAddress='.$GEmailAddress.'&Password='.$GPassword.'&PhoneNumber='.$GPhoneNumber.'&HomeResort='.$GHomeResort.'&PointsBank='.$GPointsBank.'' ) ; 

  • #2
    New Coder
    Join Date
    Nov 2005
    Posts
    22
    Thanks
    0
    Thanked 1 Time in 1 Post
    Not exactly sure what you're trying to do, but why do you need to echo each variables?

    Try replacing this:
    PHP Code:
    echo $row['OwnerID']; 
    echo 
    $row['Code']; 
    echo 
    $row['FirstName']; 
    echo 
    $row['LastName']; 
    echo 
    $row['EmailAddress']; 
    echo 
    $row['Password']; 
    echo 
    $row['PhoneNumber']; 
    echo 
    $row['HomeResort']; 
    echo 
    $row['PointsBank']; 

    echo 
    $row['OwnerID'] = $GOwnerID
    echo 
    $row['Code'] = $GCode
    echo 
    $row['FirstName'] = $GFirstName
    echo 
    $row['LastName'] = $GLastName
    echo 
    $row['EmailAddress'] = $GEmailAddress
    echo 
    $row['Password'] = $GPassword
    echo 
    $row['PhoneNumber'] = $GPhoneNumber
    echo 
    $row['HomeResort'] = $GHomeResort
    echo 
    $row['PointsBank'] = $GPointsBank
    With this:
    PHP Code:
    $GOwnerID $row['OwnerID']; 
    $GCode $row['Code']; 
    $GFirstName $row['FirstName']; 
    $GLastName $row['LastName']; 
    $GEmailAddress $row['EmailAddress']; 
    $GPassword $row['Password']; 
    $GPhoneNumber $row['PhoneNumber']; 
    $GHomeResort $row['HomeResort']; 
    $GPointsBank $row['PointsBank']; 
    Then from this point on, you can echo any of the defined variables...
    i.e.
    PHP Code:
    echo $GFirstName
    Your redirect should now work with this (at quick glance)... Hopefully this is what you're looking for.
    Last edited by forpals; 03-14-2008 at 04:58 PM.

  • Users who have thanked forpals for this post:

    chornbeck (03-15-2008)


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •