User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 373,933 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,179 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 1916 | Replies: 1
Reply
Join Date: Jun 2004
Posts: 1
Reputation: possumfire is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
possumfire possumfire is offline Offline
Newbie Poster

Help Having trouble with links on PHP site! Any help would be great!

  #1  
Jun 2nd, 2004
Hi,

On my website, I have links to different pages like the following:

[site_url]/email_req.php?email=[email]&ps=[ps]&refid=[refid]

But, it is not inserting the correct things such as referral id, site url and the others too. It just stays like that.

Any help would be great!

Thanks!
Matt
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Mar 2004
Location: In a house
Posts: 94
Reputation: Ragnarok is an unknown quantity at this point 
Rep Power: 5
Solved Threads: 0
Ragnarok Ragnarok is offline Offline
Junior Poster in Training

Re: Having trouble with links on PHP site! Any help would be great!

  #2  
Jun 2nd, 2004
if you URLs are like that in your source code you will need to do something like this:

[php]<?php
$url = preg_replace("#[(.+?)]#i","$urlbits['\\1']",$url)
?>[/php]

All you need to do the is create an array (for example $urlbits) and place all the replaces in for example [site_url] would be $urlbits['siteurl']
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb PHP Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the PHP Forum

All times are GMT -4. The time now is 6:17 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC