Jump to content

Language Not Work In Login


masrawy

Recommended Posts

  • Replies 74
  • Created
  • Last Reply

that is login file sir<html dir="rtl"><meta http-equiv="Content-Type" content="text/html; charset=windows-1256"><meta http-equiv="Content-Language" content="ar-sa"><meta name="GENERATOR" content="Microsoft FrontPage 5.0"><meta name="ProgId" content="FrontPage.Editor.Document">{include file="$config_style/headws-1256"; {if ($erro_insert_all_filds or $login_out or $login)} <div>{$erro_insert_all_filds}{$login_out}{$login}</div> {/if} <h3>الدخول للموقع</h3><br /> <p style="text-align: justify;">يرجى إدخال اسم المستخدم وكلمة السر في النموذج التالي:</p><br /> {if not $login}<div align="center"><div class="boxH" style="width: 420px;">الدخول للموقع</div><div class="boxB" style="width: 420px;"><div class="row" style="margin-top: 10px;"> <div id="showithere_log"></div><div id="showithere_log2"> <table border="0" width="100%"> <tr> <td width="99" height="25">اسم المستخدم</td> <td> <input type="text" id="login_username" size="25" dir="ltr"></td> </tr> <tr> <td width="99" height="25">كلمة المرور</td> <td> <input type="password" id="login_userpass" size="25" dir="ltr"></td> </tr> <tr> <td width="99" height="25"> </td> <td> <input type="button" value="دخول" onclick="java script: HGI_show('showithere_log'),HGI_hide('showithere_log2'),makeRequest_log();"></td> </tr> </table> <div style="text-align: center;margin-top: 10px;">| <a href="forget.html">نسيت كلمة المرور</a> | <a href="active_mail.html">تفعيل البريد</a> | <a href="active_mob.html">تفعيل الجوال</a> | <a href="register.html">تسجيل</a> |</div> </div></div></div></form> </td>{else} <!--META HTTP-EQUIV=Refresh CONTENT=1;URL=index.html--> {/if}{include file="$config_style/footer.html"}this file is under this directory/templates\hgi_site/login.html

Link to comment
Share on other sites

sir this is login.html code {include file="$config_style/header.html"} {if ($erro_insert_all_filds or $login_out or $login)} <div>{$erro_insert_all_filds}{$login_out}{$login}</div> {/if} <h3>الدخول للموقع</h3><br /> <p style="text-align: justify;">يرجى إدخال اسم المستخدم وكلمة السر في النموذج التالي:</p><br /> {if not $login}<div align="center"><div class="boxH" style="width: 420px;">الدخول للموقع</div><div class="boxB" style="width: 420px;"><div class="row" style="margin-top: 10px;"> <div id="showithere_log"></div><div id="showithere_log2"> <table border="0" width="100%"> <tr> <td width="99" height="25">اسم المستخدم</td> <td> <input type="text" id="login_username" size="25" dir="ltr"></td> </tr> <tr> <td width="99" height="25">كلمة المرور</td> <td> <input type="password" id="login_userpass" size="25" dir="ltr"></td> </tr> <tr> <td width="99" height="25"> </td> <td> <input type="button" value="دخول" onclick="java script: HGI_show('showithere_log'),HGI_hide('showithere_log2'),makeRequest_log();"></td> </tr> </table> <div style="text-align: center;margin-top: 10px;">| <a href="forget.html">نسيت كلمة المرور</a> | <a href="active_mail.html">تفعيل البريد</a> | <a href="active_mob.html">تفعيل الجوال</a> | <a href="register.html">تسجيل</a> |</div> </div></div></div></form> </td>{else} <!--META HTTP-EQUIV=Refresh CONTENT=1;URL=index.html--> {/if}{include file="$config_style/footer.html"}is ther any error in it ?

Link to comment
Share on other sites

I don't think you're understanding what I'm asking you to do. It's not going to help me to look at the script. I need you to set up a new login form, that submits to the index page, it looks like you're doing that. You need to add code to the index page for the login so that it prints out the username and password that you tried to login with, and also the username and password from the database. That's the first step in trying to figure this out. I don't know how to explain it any better. If it's telling you the username and password is wrong, then print everything out and look at why it's wrong!

Link to comment
Share on other sites

You might need to put it a little farther down, in the area after it says this:if ($action == 'slogin'){I think that's what it said.Did you type the username and password in the form? It didn't print the values from it:

<!--submitted user name: submitted password:
Link to comment
Share on other sites

You need to change this line:$result = mysql_query("SELECT * FROM users WHERE username='testuser'") or exit(mysql_error());I think "users" should be "hgi_member", and "username" should be "member_name". You'll also need to change "testuser" to the actual name you're trying to log in with. So if you type "user123" into the username box on the login form, change "testuser" to "user123". So it should look something like this:$result = mysql_query("SELECT * FROM hgi_member WHERE member_name='user123'") or exit(mysql_error());Make sure to use the correct user name though.

Link to comment
Share on other sites

like that echo "<!--\n";echo 'submitted user name: ' . $_POST['username'] . "\n";echo 'submitted password: ' . $_POST['password'] . "\n";$result = mysql_query("SELECT * FROM hgi_member WHERE member_name='user123'") or exit(mysql_error());if ($row = mysql_fetch_assoc($result)){ echo 'database user name: ' . $row['username'] . "\n"; echo 'database password: ' . $row['password'] . "\n";}else echo 'test user not found';echo "\n-->";is that code write ?

Link to comment
Share on other sites

i did i putecho "<!--\n";echo 'submitted user name: ' . $_POST['username'] . "\n";echo 'submitted password: ' . $_POST['password'] . "\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['username'] . "\n"; echo 'database password: ' . $row['password'] . "\n";}else echo 'test user not found';echo "\n-->";عمرو=user123is that write if write tell me the user or basword wrongethis is sourse code<!--submitted user name: submitted password: database user name: database password: --><p align="center"> <div>إما أن يكون أسم المستخدم خطأ أو تكون كلمة المرور خطأ<br />يرجى المحاولة مرة أخرى<br /><a href="#" onclick="java script: HGI_show('showithere_log2'),HGI_hide('showithere_log');">للعودة لصفة تسجيل الدخول مرة أخرى</a></div> </p>

Link to comment
Share on other sites

Archived

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


×
×
  • Create New...