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> "; } ?> Link to comment https://forums.phpfreaks.com/topic/95028-question-about-a-question-mark/ Share on other sites More sharing options...
phpretard Posted March 8, 2008 Author Share Posted March 8, 2008 Nothing? Link to comment https://forums.phpfreaks.com/topic/95028-question-about-a-question-mark/#findComment-486764 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']));?> Link to comment https://forums.phpfreaks.com/topic/95028-question-about-a-question-mark/#findComment-486769 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? Link to comment https://forums.phpfreaks.com/topic/95028-question-about-a-question-mark/#findComment-486771 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. Link to comment https://forums.phpfreaks.com/topic/95028-question-about-a-question-mark/#findComment-486919 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 "?"? Link to comment https://forums.phpfreaks.com/topic/95028-question-about-a-question-mark/#findComment-486921 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.