How to construct variable external link

Discussion in 'PHP' started by zambala, Apr 2, 2012.

  1. #1
    Hello,

    I'm trying to create a variable external link or redirect, but I'm complete beginner with php...

    1.In one instance I have a script for registration (address, desciption, features, etc) with Post--> I am trying to add another field for URL --> I have added this extra line and extra line in MySql database.... "property_link"

    2. In another instance I have a script with Constructed link which currently point to "Booking Form" (depending on the item(property) --> but I need to replace with external link from registration Form for each item....
    ------------------------------------
    - But I don't understand How to replace/construct it?!
    Now it looks like
    //$url=SITEPAGE_URL."&task=dobooking&selectedProperty=$property_uid}";// --> and everyone tells me I should create the new link with something like $_POST['property_link']; - but when I try, it doesn't work [​IMG] How it should be joined/redirected

    how to combine:
    $url=SITEPAGE_URL."&task=dobooking&selectedProperty=$property_uid}";+ $_POST['property_link'];

    Or - How to create URL with matching item page+ external url from registration data ?
     
    zambala, Apr 2, 2012 IP
  2. ROOFIS

    ROOFIS Well-Known Member

    Messages:
    1,234
    Likes Received:
    30
    Best Answers:
    5
    Trophy Points:
    120
    #2
    Here your treating the reference as an integer sum with the '+' on a non-integer property. Try to replace it with a dot to append instead,
    like:

    
    $url=SITEPAGE_URL."&task=dobooking&selectedProperty=$property_uid"[B][COLOR="#008000"].[/COLOR][/B]$_POST['property_link'];
    
    Code (markup):


    :)



    ROOFIS
     
    Last edited: Apr 2, 2012
    ROOFIS, Apr 2, 2012 IP