Thread: headers

    #1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2000
    Location
    Cleveland, Ohio US
    Posts
    0
    Rep Power
    0
    What might be a possible reason why a header would not advance to the url that it's supposed to go?

    Here's the script:
    <?
    require("Cart.php3");
    DBinfo();
    Root();
    mysql_connect("$DBHost","$DBUser","$DBPass");
    mysql("$DBName","INSERT INTO CartItems VALUES
    ('$UID','$ItemID','$ItemQuantity','$Date','$CartItemsID')");
    Header("Location: $Relative/viewCart.php3?UID=$UID");
    ?>

    tia

    Jay
  2. #2
  3. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2000
    Posts
    1
    Rep Power
    0
    Have you not noticed that this is a PERL forum? PHP is not Perl.

    ------------------
    The three virtues of a programmer: Impatience, Hubris, Caffeine Addicition.
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2000
    Location
    Cleveland, Ohio US
    Posts
    0
    Rep Power
    0
    Yes, I realized that after I posted.....It was an accident. But thanks for posting it to my attention! Genius of you.
  6. #4
  7. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2000
    Posts
    0
    Rep Power
    0
    I'm not sure if PHP handles this for you automagically, but you don't have any newlines after your Location header.

IMN logo majestic logo threadwatch logo seochat tools logo