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? Quote Link to comment 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? Quote Link to comment 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. Quote Link to comment 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 -.- 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.