Lee-Bartlett Posted October 24, 2008 Share Posted October 24, 2008 My varibles are creating a space in the url and ofc that breaks the url, how do i solve this? My db also has no spaces in the collums name to This is my code. <?php $link = mysql_connect('localhost','root', 'prodr192664'); if($link && mysql_select_db('nexodom_test')) { $sql = "select * from tblbasicform limit 1"; $res = mysql_query($sql); $row = mysql_fetch_array($res); $addr = 'http://maps.google.com/staticmap?center='.$row[longitude].','.$row[latitude].'&zoom=12&size=400x400&key=ABQIAAAAgnVrcDn5i-V_BsqvXy3j8RRle8Rt1EK93-n5qGMjk9aCuGqlpBQ2sCqItCc79KzQksp90dVmLGk45w'; header("Expires: Thu, 01 Jan 1970 00:00:01 GMT"); header("Location: $addr"); //echo "We will call this URL: <b>$addr</b>"; //exit(); } echo 'Cannot connect to database'; ?> Quote Link to comment Share on other sites More sharing options...
discomatt Posted October 24, 2008 Share Posted October 24, 2008 $link = mysql_connect('localhost','root', 'prodr192664'); Slick. might wanna change that. Try urlencode() Quote Link to comment Share on other sites More sharing options...
Lee-Bartlett Posted October 24, 2008 Author Share Posted October 24, 2008 nah it was fine, it was my db, it was text instead of varchar Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.