Forum Moderators: coopster
1. i want to make this a case-sesnsitive query :
select * from users where username = '$username' and password='$password' and status = '1';
The password part is okay. I want to make the username part a case-sensitive one.
And now yet again, I m stuck at INTERNET EXPLORER!
if( (!isset($_COOKIE['user'])) && (!session_is_registered("password")) )
if($Login){
wteva
}
This works fine.
else if( (isset($_COOKIE['user'])) && (!session_is_registered("password")) ) {
if($Login){
wteva
}
In this case, it works fine in FF and Opera. In internet explorer, the page refreshes and nothing happens.
This is how i have declared the button :
<input name="Login" type="submit" id="Login" value="Login" class="button"/>
And at the beginning of the code i have this :
$Login=$_POST['Login'];
Also, the form has been declared this way :
<form id="form1" name="form1" method="post" action="">
I hope we get a solution.
Or while initially creating the table:
CREATE TABLE this_table(. . .) CHARACTER SET latin1 COLLATE latin1_bin;
In internet explorer, the page refreshes and nothing happens.
Could it be because you have your Cookies disabled? PHP is a server side script, and shouldn't really depend on the browser for anything it executes on the server side.
Habtom
When the cookie is set and i display the form in the following way, then it works perfectly :
<form id="form1" name="form1" method="post" action="">
<center>Username :
<input class="index" name="username" type="text" id="username" />
<p>Password : <input class="index" name="password" width="12px" type="password" id="password" />
</p>
<input name="Login" type="submit" id="Login" value="Login" />
</form>
But when I make a slight change and display it in the way i want it doesnt work...
<form name='form1' method='post' action=''>
<center>Username : ". $_COOKIE['user'] . "
<p>Password : <input class='index' name='password' type='password' id='password'>
</p>
<input name='Login' type='submit' id='Login' value='Login'>
</form>
I hope it wud now be easy to detect the problem. Please help. Its urgent.
always a good step
so you said it works one way but when you change it then it doesn't. taking into account Habtom's change and adding my own. If you need to actually send the username with the form your second example wouldn't work without a hidden field for password
<form name='form1' method='post' action=''>
<center>Username : <?php echo $_COOKIE['user'];?>
<input type="hidden" name="username" value="<?php echo $_COOKIE['user'];?>" />
<p>Password : <input class='index' name='password' type='password' id='password'>
</p>
<input name='Login' type='submit' id='Login' value='Login'>
</form>
maybe something like that
When I enter the password and press enter (in IE), nothing happens. But instead of pressing enter, If i click the login button, then i m redirect to wteva page i shud be to.
No such problems occur in mozilla or opera.