Placebo Posted August 26, 2008 Share Posted August 26, 2008 i have a html form that send a text input data ($query) to a php script the php script adds it to database ... in php script i want to change the encode of $_get variable to UTF-8 . i used htmlspecialchars('$query' ,'','UTF-; but it return 0 when i print it ... any other way ? plz help me :-\ Link to comment https://forums.phpfreaks.com/topic/121368-changing-encode-of-a-field/ Share on other sites More sharing options...
Mchl Posted August 26, 2008 Share Posted August 26, 2008 Configure your html as utf8. All data from forms should be already in utf8 then. Link to comment https://forums.phpfreaks.com/topic/121368-changing-encode-of-a-field/#findComment-625777 Share on other sites More sharing options...
haku Posted August 26, 2008 Share Posted August 26, 2008 You can also set the accept charset attribute in the form tag. Link to comment https://forums.phpfreaks.com/topic/121368-changing-encode-of-a-field/#findComment-625785 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.