Jump to content
php.lv forumi

Mistika ar cepumiem


Slammer

Recommended Posts

Ir html lapa kurā ir :

                      <td height="25%">
			<?  
			# login form
			if (!isset($_COOKIE['name'], $_COOKIE['pass'])){
			include("includes/login.html");
			}
			?>
		</td>

 

login.html saturs ir sekojošs:

<table width="100%" border="0">
 <tr>
   <td>
<form name="form1" method="post" action="login_handler.php">
     <table width="100%" border="0">
       <tr>
         <td><div align="center" class="style2">Ielogoties</div></td>
       </tr>
       <tr>
         <td><div align="center">
           <label>
           <input name="name" type="text" id="name" size="15">
           </label>
         </div></td>
       </tr>
       <tr>
         <td><div align="center">
           <label>
           <input "name="pass" type="password" id="pass" size="15">
           </label>
         </div></td>
       </tr>
       <tr>
         <td><div align="center">
           <input type="submit" name="Submit" value="Apstiprināt" />
         </div></td>
       </tr>
       <tr>
         <td><div align="center">
           <label></label>
           <a href="?page=1_2">Reģistrācija</a>          </div></td>
       </tr>
     </table>
   </form>
   </td>
 </tr>
</table>

 

loginhandler.php saturs ir sekojošs:

<?
# paarbaudam ar MySQL datubaazi paroli || ielogojam lietotaaju || paarnesam vinju uz ?page=3_1
$name = $_POST['name'];
$pass = $_POST['pass'];
$pass = md5($pass);
include("includes/config.php");
$sql = "SELECT * FROM `users` WHERE `name`='$name' AND `pass`='$pass'";
$sql = mysql_query($sql);
$row = mysql_fetch_array($sql);
if(($row["name"] == $name) && ($row["pass"] == $pass)){
setcookie("name", $name, time() + 60*60*1); 			// 1h
setcookie("pass", $pass, time() + 60*60*1);
echo'<META HTTP-EQUIV="Refresh" CONTENT="0; URL=index.php?page=3_1">';
}
?>

 

Vislielākā mistika ir tāda, ka uz firefox 2 cepumi liekas, bet uz IE7 nē wtf? Jums ir idejas?

Edited by Slammer
Link to comment
Share on other sites

Vari iedot linku, kur var apskatities?

Link to comment
Share on other sites

×
×
  • Create New...