RichardRotterdam Posted February 1, 2008 Share Posted February 1, 2008 Hi, I have a prob which pretty much makes me wanna bang my head agains the desk. But here is the problem in the URL is pass a variable m%c3%bcnchen for example http://localhost/page.php?city=m%c3%bcnchen now i want the querry do a select query as followed SELECT * FROM cities where city_name="münchen" when i do this <?php echo($_GET['city']) ?> it displays münchen and also in the source any suggestions and yeah i know using city id should be the way but i cant do that Quote Link to comment https://forums.phpfreaks.com/topic/88867-special-characters/ Share on other sites More sharing options...
dj scousey Posted February 1, 2008 Share Posted February 1, 2008 not sure if its of any use to you, but maybe the following would be better? <?php $sql = "SELECT * FROM cities where city_name='münchen'" echo $sql; ?> Quote Link to comment https://forums.phpfreaks.com/topic/88867-special-characters/#findComment-455165 Share on other sites More sharing options...
RichardRotterdam Posted February 1, 2008 Author Share Posted February 1, 2008 yeah that would work and that does work how ever I want this to work SELECT * FROM cities where city_name="\".$_GET['city']."\""; Quote Link to comment https://forums.phpfreaks.com/topic/88867-special-characters/#findComment-455176 Share on other sites More sharing options...
dj scousey Posted February 1, 2008 Share Posted February 1, 2008 Maybe the following... $city_name = $_GET['city']; $city = $db->get_row("SELECT * FROM cities WHERE CityName = '$city_name'"); Quote Link to comment https://forums.phpfreaks.com/topic/88867-special-characters/#findComment-455191 Share on other sites More sharing options...
dj scousey Posted February 1, 2008 Share Posted February 1, 2008 Have a look at this external query. Might shed some light on your problem. Click Here Quote Link to comment https://forums.phpfreaks.com/topic/88867-special-characters/#findComment-455203 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.