Welcome to WebmasterWorld Guest from 54.227.83.19

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

How to construct variable external link

     

zambala

4:48 am on Apr 1, 2012 (gmt 0)



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 go 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 join the new link something like $url=$_POST['url']; - but when I try, it doesn't work :( How it should be joined/redirected

cffrost2

4:08 pm on Apr 2, 2012 (gmt 0)

5+ Year Member



Not sure what you're asking. Are you having them type a complete link and need to display it, replacing the current $url var?

zambala

5:39 pm on Apr 2, 2012 (gmt 0)



Yes. Trying to replace current.

- current link use "selectedProperty=$property_uid" - and I need to keep it adding + url from registration form ($_POST);
- and for next Property would be again "selectedProperty=$property_uid" + $_POST
-------------------------------------

zambala

5:49 pm on Apr 2, 2012 (gmt 0)



in other words:

User is searching for properties;
Each unique property have a unique link depending on property number ($property_uid)

cffrost2

6:56 pm on Apr 2, 2012 (gmt 0)

5+ Year Member



Ok. So this is the link you need to show, but need the url var added added to the end. Right?


Now it looks like
//$url=SITEPAGE_URL."&task=dobooking&selectedProperty=$property_uid}";// --> and everyone tells me I should join the new link something like $url=$_POST['url']; - but when I try, it doesn't work :( How it should be joined/redirected


Try this

$url=SITEPAGE_URL."&task=dobooking&selectedProperty=".$property_uid."&url=".$_POST['url];}"

Is that what you were after?
 

Featured Threads

Hot Threads This Week

Hot Threads This Month