vurentjie Posted March 13, 2008 Share Posted March 13, 2008 hi, i need a bit of assistance, i have a link that gets a dynamic href property, the link is generated through a mysql fetch array query e.g. while($row=mysql_fetch_array($query) { echo "<a href='www.something?name='".$row[name]."'>'".$row[name]."</a>"; } on the next page i call $X = $_GET['name']; and then use this in another mysql query, i have a problem because $row['name'] might have certain characters like Â, Û, among others... this hampers my next mysqlcall as I don't know how ti filter decode the browsers translations of these symbols, any help? Link to comment https://forums.phpfreaks.com/topic/95945-special-character-help/ Share on other sites More sharing options...
conker87 Posted March 13, 2008 Share Posted March 13, 2008 Would using htmlentities() or htmlspecialchars() be of help here? Link to comment https://forums.phpfreaks.com/topic/95945-special-character-help/#findComment-491164 Share on other sites More sharing options...
thebadbad Posted March 13, 2008 Share Posted March 13, 2008 Try to urlencode the query string, and then urldecode it on the next page. Also remember to run a mysql_real_escape_string on any user input used in a query. Link to comment https://forums.phpfreaks.com/topic/95945-special-character-help/#findComment-491169 Share on other sites More sharing options...
conker87 Posted March 13, 2008 Share Posted March 13, 2008 Try to urlencode the query string, and then urldecode it on the next page. Also remember to run a mysql_real_escape_string on any user input used in a query. That's the one! Couldn't remember the function -.- Link to comment https://forums.phpfreaks.com/topic/95945-special-character-help/#findComment-491325 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.