phpretard Posted March 8, 2008 Share Posted March 8, 2008 I don't understand why the phone numbers echo with a ? at the end. (only some of them) The database has the right number. (850) 697-4576? <--why <? $result = mysql_query("SELECT * FROM maps WHERE city='$page'"); while($row = mysql_fetch_array($result)) { $company=$row['company']; $phone=$row['phone']; $url=$row['url']; $street1=$row['street1']; $city1=$row['city1']; $zip=$row['zip']; $id=$row['id']; echo" <p class=\"sidebar-title-noshade\"><a target=_blank href=\"http://$url\">$company</a> <div class=\"sidebar-txtbox-noshade\"> <table border=0 width=100% id=table1 cellspacing=0 cellpadding=0> <tr> <td> $phone </td> </tr> <tr> <td> $street1 <br> $city1, FL $zip </td> </tr> </table> </div> "; } ?> Quote Link to comment Share on other sites More sharing options...
phpretard Posted March 8, 2008 Author Share Posted March 8, 2008 Nothing? Quote Link to comment Share on other sites More sharing options...
darkfreaks Posted March 8, 2008 Share Posted March 8, 2008 <?php $phone= str_replace("?","",$phone);?> also when you enter the phone number try doing this: <?php $phone= mysql_real_escape_string(trim($_POST['phone']));?> Quote Link to comment Share on other sites More sharing options...
rofl90 Posted March 8, 2008 Share Posted March 8, 2008 why have you got it as http://5555555555 or is it like some skype mechanism or voip thing? Quote Link to comment Share on other sites More sharing options...
phpretard Posted March 8, 2008 Author Share Posted March 8, 2008 rofl90, $url is pulled from the database. The value is something like "www.phpfreaks.com". So it echos -http://www.phpfreaks.com-. Can you suggest a better way? I am constantly learning. Thank you, Anthony oh yeah...I have no clue what voip or skyoe is. Quote Link to comment Share on other sites More sharing options...
phpretard Posted March 8, 2008 Author Share Posted March 8, 2008 I entered the phone numbers the same way. Why do some have "?"? 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.