Jump to content

submit form not working with firefox 7 or chrome


nomanoma

Recommended Posts

hi,

I try to login through a form but when I click the button it does nothing in firefox7 and chrome. It works fine in IE.

here's the code:

$a="";
$b="";
if ($_POST) {
$a=trim($_POST["id"]);
$b=trim($_POST["password"]);
$a=str_replace("'","",$a);
$b=str_replace("'","",$b);
$a=str_replace("\"","",$a);
$b=str_replace("\"","",$b);
}
if ($a=="" || $b=="")
{

  if ($_SESSION["id_session"]=="" || $_SESSION["password_session"]=="")
  {

?>
		<form action=members.php method=post>

<br><br><Center><table><tr><td colspan=2 align=center><h3>Members Login Area</h3></td></tr>
<tr><td>Member's ID</td><td><input type=text name=id></td></tr>
<tr><td>Password</td><td><input type=password name=password></td></tr>
<tr><td> </td><td>
<a href="forgot.php" onclick="doexit=false;"><font face="Verdana,Arial,Helvetica" size="1" color="#000000"><b>Forgot Your Password?</b></font></a></td></tr>
<tr><td colspan=2 align=center><input type=submit value="Log In"></td></tr>			
</table></form>


<?
  }
  else
  {
  middle();
  }
}
else
{
$check=0;

$id=$_POST["id"];
$rs = mysql_query("select * from members where ID='$id'");

if ($rs) {
$arr=mysql_fetch_array($rs);
$n2=$arr['Password'];
if ($n2==$b) {
	$check=1;
	$_SESSION["id_session"]=$arr[0];
	$_SESSION["password_session"]=$arr[9];
	middle();
}
}
if ($check==0)
{
  print "<h2>Invalid User Id or Password</h2>";
?>
		<form action=members.php method=post>

<br><br><Center><table><tr><td colspan=2 align=center><h3>Members Login Area</h3></td></tr>
<tr><td>Member's ID</td><td><input type=text name=id></td></tr>
<tr><td>Password</td><td><input type=password name=password></td></tr>
<tr><td> </td><td>
<a href="forgot.php" onclick="doexit=false;"><font face="Verdana,Arial,Helvetica" size="1" color="#000000"><b>Forgot Your Password?</b></font></a></td></tr>
<tr><td colspan=2 align=center><input type=submit value="Log In"></td></tr>			
</table></form>
<? 
} 
}

 

thanks

Archived

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

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.