I have a quick search function. But pass the test. Find the kanji I typed into the text box. is garbled. I used a function to convert it before. But forgetting that is the function again. I posted the approximate code. The great gods come and help me. Tokyu
Select Supplier
>
Quick Search for customers: Select customer
>
Reply to discussion (solution)
My userajax.php Code
Connect ($db _config); $sql = ' Select Id,true_name from the users where User_type = 1 and true_name like '% '. $username. ' % "';//echo $sql; exit (); $rs = mysql_query ($sql); $html = ''; $html. = 'Please select customer '; while (@ $row =mysql_fetch_array ($rs)) {$html. = "". $row [' True_name '].";} $html. = ''; Echo $html;? >
First look at your page's character set encoding, keep the HTML page and PHP encoding consistent, should be the result of inconsistent coding
First look at your page's character set encoding, keep the HTML page and PHP encoding consistent, should be the result of inconsistent coding
It's been checked. It's all GBK. I've used a function to change it better than before. But I forgot it was the function.
String Iconv (String $in _charset, String $out _charset, String $str)
Thank you, I solved it.
$_post[' username ']=iconv ("UTF-8", "GBK", $_post["username"]);
I'm going to have to deal with Ajax like this.