homepage Welcome to WebmasterWorld Guest from 23.20.44.136
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
How to construct variable external link
zambala




msg:4435790
 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




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

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




msg:4436302
 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




msg:4436309
 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




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

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?

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved