Inserting symbols in mysql using php -
i'm using php , mysql , have problem inserting latitude , longitude values along degree, min , sec symbols. (°,',") symbols.
i have referred several sites , tried different ways can't solve it.
first tried copying symbols , concatenating 3 user input values.
$latitude=$degree.'°'.$min.'''.$sec.'?'.'n';
then after executing insert query,the $latitude variable value inserted in database, symbols replaced random characters shown here.
2˚3ʼ4ˮn (data stored in database)
then tried using html character code instead of symbols.
$latitude=$degree.'°'.$min.'’'.$sec.'#8221'.'n';
but doesn't work.it displays same html characters in databse.
i don't know whether problem html entities or something.
try function:
$result = mysqli_real_escape_string();
refer following link