Jump to content

Language Not Work In Login


masrawy

Recommended Posts

This is strange:<!--submitted user name: submitted password: database user name: database password: -->It's not showing you what you type in? It should be printing the usernames and passwords that you typed and from the database, it's not printing that?

Link to comment
Share on other sites

  • Replies 74
  • Created
  • Last Reply

I thought so, but it's not. The names are incorrect. It should be this:

echo 'submitted user name: ' . $_POST['login_username'] . "\n";echo 'submitted password: ' . $_POST['login_userpass'] . "\n";$result = mysql_query("SELECT * FROM hgi_member WHERE member_name='عمرو'") or exit(mysql_error());if ($row = mysql_fetch_assoc($result)){echo 'database user name: ' . $row['member_name'] . "\n";echo 'database password: ' . $row['member_pass'] . "\n";}

It should be "login_username" and "login_userpass" instead of "username" and "password", and "member_name" and "member_pass" for the database.

Link to comment
Share on other sites

OK, that's why it's saying the username wasn't found. Try using utf8_encode when you get the username and password. e.g.:echo 'submitted user name: ' . utf8_encode($_POST['login_username']) . "\n";echo 'submitted password: ' . utf8_encode($_POST['login_userpass']) . "\n";

Link to comment
Share on other sites

I'm sorry, I don't think I can help you with this, I have never worked with Arabic text before. It would probably go quicker if you could find someone to help who has experience working with Arabic text. The site I linked to does have free classes to use to work with Arabic text between PHP and MySQL.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.


×
×
  • Create New...