drde3456 2016-09-13 06:37
浏览 52

使用阿拉伯语输入构建登录表单。 如何匹配记录

I am building a form using PHP and I want the user to login with his Arabic name. I have set the database to UTF-8 and the column to UTF-8.

And I have enter the following code in my PHP script:

header('Content-Type: text/html; charset=UTF-8');

And when I output the result it is written in arabic, so no junk letters ...

Why it doesn't log me in when I use arabic username and when I use english username it logs me in?

  • 写回答

1条回答 默认 最新

  • douxi6903 2016-09-13 06:51
    关注

    A few things to check:

    1. What is your database encoding? Maybe you input is utf-8, but it has been transformed into something else :)
      1. Check your framework (if you are using any) - maybe there is a build in mechanism to transform this
      2. Do you use mysqli to connect? I bet you do - try PDO instead
      3. There is a small discussion here about similar topic: log in with Arabic characters
    评论

报告相同问题?

悬赏问题

  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统
  • ¥15 AT89C51控制8位八段数码管显示时钟。
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 下图接收小电路,谁知道原理
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度
  • ¥30 关于#r语言#的问题:如何对R语言中mfgarch包中构建的garch-midas模型进行样本内长期波动率预测和样本外长期波动率预测
  • ¥15 ETLCloud 处理json多层级问题