We're a community of 1077K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,076,524 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

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

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 :)

2
Contributors
1
Reply
1 Hour
Discussion Span
8 Years Ago
Last Updated
3
Views
possumfire
Newbie Poster
1 post since Jun 2004
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

if you URLs are like that in your source code you will need to do something like this:

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

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

Ragnarok
Junior Poster in Training
94 posts since Mar 2004
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

This article has been dead for over three months: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
 
© 2013 DaniWeb® LLC
Page rendered in 0.0659 seconds using 2.65MB