DBookatay Posted November 20, 2007 Share Posted November 20, 2007 I have a field in my dB that I use to store links from other websites, (Kelly Blue Book / kbb.com) to be exact, which uses links like this: http://www.kbb.com/KBB/UsedCars/PricingReport.aspx?VehicleId=3110&ManufacturerId=34&ModelId=227&YearId=2004&Mileage=54210&SelectionHistory=3110%7c6222%7c06810%7c0%7c0%7c120944%7ctrue%7c120968%7ctrue%7c120857%7ctrue Problem is, when I pull the info out of the dB $kbbSlctn = $row['kbbSlctn']; it turns all of the "%" into "|", so the result is http://www.kbb.com/KBB/UsedCars/PricingReport.aspx?VehicleId=3110&ManufacturerId=34&ModelId=227&YearId=2004&Mileage=54210&SelectionHistory=3110|7c6222|7c06810|7c0|7c0|7c120944|7ctrue|7c120968|7ctrue|7c120857|7ctrue What is happening here? Link to comment https://forums.phpfreaks.com/topic/78158-my-query-turns-all-into/ Share on other sites More sharing options...
Daukan Posted November 21, 2007 Share Posted November 21, 2007 Its decoding the url use this on it to turn it back into a link <?php $link = urlencode('http://www.kbb.com/KBB/UsedCars/PricingReport.aspx?VehicleId=3110&ManufacturerId=34&ModelId=227&YearId=2004&Mileage=54210&SelectionHistory=3110%7c6222%7c06810%7c0%7c0%7c120944%7ctrue%7c120968%7ctrue%7c120857%7ctrue'); ?> Link to comment https://forums.phpfreaks.com/topic/78158-my-query-turns-all-into/#findComment-395523 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.