Help with php script (problems with = sign)

Discussion in 'PHP' started by adamjthompson, Jun 28, 2006.

  1. #1
    Hello,

    I have the following script, which is giving me problems. As you can see, it is a form submission, which redirects to another form submission (the "redirect" variable). However, the = signs are acting up.

    The problem is that it wants to redirect to "http://probuilderplus.com/LeadInterface/?memberid" because it thinks the rest are additional variables, not part of the url to direct to.

    I hope my description of the problem makes sense. Thanks for any help...

    ~Adam
    
    <?php 
    header( "Location: http://www.aweber.com/scripts/addlead.pl?meta_web_form_id=1185610005&unit=natebianco&redirect=http://probuilderplus.com/LeadInterface/?memberid=395209&fname=".$_POST["FIRST"]."&lname=".$_POST["LAST"]."&email=".$_POST["EMAIL"]."&phone=".$_POST["PHONE"]."&ipaddress=".$_SERVER["REMOTE_ADDR"]."&leadprovider=MyAuto&meta_adtracking=MyAuto&meta_message=1&meta_required=from&meta_forward_vars=0&name=".$_POST["FIRST"]." ".$_POST["LAST"]."&from=".$_POST["EMAIL"]."" ) ;
    ?>
    PHP:
     
    adamjthompson, Jun 28, 2006 IP
  2. adamjthompson

    adamjthompson Well-Known Member

    Messages:
    1,242
    Likes Received:
    59
    Best Answers:
    0
    Trophy Points:
    125
    #2
    adamjthompson, Jun 28, 2006 IP
  3. jestep

    jestep Prominent Member

    Messages:
    3,659
    Likes Received:
    215
    Best Answers:
    19
    Trophy Points:
    330
    #3
    Can you move the ?memberid to the end of the url instead of the begining?
     
    jestep, Jun 28, 2006 IP
  4. mitchandre

    mitchandre Peon

    Messages:
    313
    Likes Received:
    33
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Don't use the ? mark?
     
    mitchandre, Jun 28, 2006 IP
  5. ccoonen

    ccoonen Well-Known Member

    Messages:
    1,606
    Likes Received:
    71
    Best Answers:
    0
    Trophy Points:
    160
    #5
    maybe try using ticks (') instead of quotes (") ?
     
    ccoonen, Jun 28, 2006 IP
  6. adamjthompson

    adamjthompson Well-Known Member

    Messages:
    1,242
    Likes Received:
    59
    Best Answers:
    0
    Trophy Points:
    125
    #6
    What I think I need is a way to send the redirect url variable through the aweber system without it being in a format that aweber interprets as variables for it's use. Other than doing a mod-rewrite on the other end so that the url is a static page, I can't figure it out.

    I guess I could use a cookie to pass the redirect url info, too, huh?
     
    adamjthompson, Jun 29, 2006 IP
  7. Chemo

    Chemo Peon

    Messages:
    146
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Reference this thread: Parsing URL

    Your solution is to urlencode() or rawurlencode() the URL parameter (which is itself an URL). You'll have to use PERL to URL decode it though...

    Bobby
     
    Chemo, Jun 29, 2006 IP
  8. jimrthy

    jimrthy Guest

    Messages:
    283
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Why? What's wrong with urldecode()?
     
    jimrthy, Jul 1, 2006 IP