English 中文(简体)
每一名浏览器都使用磷酸盐,但没有使用
原标题:Php code works on every browser but not on IE8
  • 时间:2010-06-10 01:59:49
  •  标签:
  • php

我认为,这一错误必须与国际电子数据8不相符合,国际电子数据8中的uz子操纵,你可以看到密码和标志,但当你输入数据并寄出浏览器似乎没有任何东西时,这是你可以尝试我的代码:

该法典是:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="it" http-equiv="Content-Language" />
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>Formulario</title>
<style type="text/css">
h1 {    font: 50px Tahoma, Helvetica, Arial, Sans-Serif; text-align: center; color: #111; text-shadow: 0px 2px 3px #555;    }
h2 {    font: 14px Tahoma, Helvetica, Arial, Sans-Serif; text-align: center; color: #CCC; text-shadow: 0px 1px 2px #555;    }
h3 {    font: 10px Tahoma, Helvetica, Arial, Sans-Serif; text-align: center; color: #CCC;   }
b1 {    font: 16px Tahoma, Helvetica, Arial, Sans-Serif; color: #DDD;   }
b2 {    font: 10px Tahoma, Helvetica, Arial, Sans-Serif; color: #F9F7ED;    }

.caja {  width: 690px; height: 40px; background-color: transparent; border: 0px solid #000000; font-size:x-large; color: #222; font-family:  Trebuchet MS ,  Lucida Sans Unicode ,  Lucida Grande ,  Lucida Sans , Arial, sans-serif; font-weight: bold;" size="299";  }
.style1 {   text-align: right; }
</style>
</head>
<body style="background-image: url( IMG/bg.png )">
<script type="text/javascript" src="JS/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="JS/jquery.notifications-1.1.min.js"></script>
<link rel="stylesheet" type="text/css" href="JS/jquery.notifications.css" />
<script> function checkCharCount(textfield) { if(textfield.value.length > 300) textfield.value = textfield.value.substr(0, 300); document.getElementById("charCounter").innerHTML = 300 - textfield.value.length; } </script>
<?php
include("/LIB/HeadSQL.php");
include("/LIB/error.php");
if (isset($_COOKIE[ ID_tablon ])) { 
        $username = $_COOKIE[ ID_tablon ]; 
        $pass = $_COOKIE[ Key_tablon ];
        $check = mysql_query("SELECT * FROM usuarios WHERE nombre =  $username ") or die(mysql_error());
        while($info = mysql_fetch_array( $check )) {
            if ($pass != $info[ clave ]) {
                login();
            }
            else {
                entro($info[ email ],$username);
            }
        }
} else {
    login();
}


function login()
{
    if (isset($_POST[ quiere ])) {
        if(!$_POST[ username ] | !$_POST[ pass ]) {
            include("LIB/login.php");
            error( Debes llenar todos los campos. ,0);
        } else {
            $check = mysql_query("SELECT * FROM usuarios WHERE nombre =  ".$_POST[ username ]." ") or die(mysql_error());
            $check2 = mysql_num_rows($check);
            if ($check2 == 0) {
                include("LIB/login.php");
                error( Ese usuario no existe. ,0);
            }
            while($info = mysql_fetch_array( $check )) {
                $_POST[ pass ] = stripslashes($_POST[ pass ]);
                $info[ clave ] = stripslashes($info[ clave ]);
                //$_POST[ pass ] = md5($_POST[ pass ]);
                if ($_POST[ pass ] != $info[ clave ]) {
                    include("LIB/login.php");
                    error( La clave es incorrecta. ,0);
                } else { 
                    $_POST[ username ] = stripslashes($_POST[ username ]); 
                    $hour = time() + 3600; 
                    setcookie("ID_tablon", $_POST[ username ], $hour); 
                    setcookie("Key_tablon", $_POST[ pass ], $hour); 
                    entro($info[ email ],$_POST[ username ]);
                }
            } 
        } 
    } else {
        include("LIB/login.php");
    }
    exit;
}


function entro($email,$username)
{
?>

<div id="todo" align="center" >
    <div id="cabeza" style="width:850px;height:100px">
    </div>
    <div id="contenido" style="width:850px;height:420px;background-image: url(IMG/cuadro.png)" >
        <div id="titulo" style="width:765px;height:75px;padding-top: 18px;margin: auto;text-align: left;">
            <b1>Bienvenido <b><?php echo($username); ?></b></b1><br>
            <?php $check = mysql_query("SELECT * FROM sms WHERE ref =  ".$username."  ORDER BY fecha DESC LIMIT 0, 1") or die(mysql_error());
            while($info = mysql_fetch_array( $check )) { 
                echo("<b1> Tu ultimo mensaje enviado fue: </b1><b2>" . $info[ texto ] . " enviado el " . $info[ fecha ] . "</b2>");
            }
            ?>
        </div>
        <form method="post">
        <div id="formulario" style="width:850px;height:255px;margin-top: 10px">
            <div id="foto" align="right" style="width:725px; height:40px;padding-top: 11px;margin: auto">
                <?php $size = 60; $grav_url = "http://www.gravatar.com/avatar/" . md5( strtolower( $email ) ) . "?size=" . $size; 
                $size = 256; $grav_urlB = "http://www.gravatar.com/avatar/" . md5( strtolower( $email ) ) . "?size=" . $size;
                echo( <img alt="Image" src="  . $grav_url .  " /> ); ?>
            </div>
            <div id="texto" style="width:850px;height:29px; margin-top: 38px;margin-left: 4px">
                    <input name="sms" type="text"  onKeyUp="checkCharCount(this)" class="caja"  />
            </div>
            <div id="botones" style="width:725px;height:27px; margin-top: 15px" class="style1">
                <input name="usuario" type="hidden" value="<?php echo($username); ?>" />

                <input name="Submit1" type="image" value="submit" src="IMG/envia.png" />
            </div>
            <div id="resta" style="width:850px;height:29px; margin-top: 53px;margin-left: 4px">
                <h2><span id="charCounter">300</span> caracteres restantes.</h2>
                <h3><a href=logout.php>Cerrar Sesion</a></h3>
            </div> 

        </div>
        </form>
    </div>
</div>

</body>

</html>


<?php
session_start();
if (isset($_POST[ Submit1 ])) {
if (isset($_SESSION[ token ]) && (time() - $_SESSION[ token ]) < 5) {
   error( Debes esperar 5 segundos para poder enviar otra informacion. ,0);
} else { 
   $_SESSION[ token ] = time();
   include("/LIB/HeadSQL.php");
   include("/LIB/comprueba.php");
   $insert = "INSERT INTO sms (ref, texto, fecha) VALUES ( " . addslashes($_POST[ usuario ]) . " ,  " . addslashes($_POST[ sms ]) . " , NOW() )";
   $add_member = mysql_query($insert);
   error("Tu mensage ha sido enviado con exito.",1);
}
}
    exit;
}
?>

你们是否认为,什么是 j?

or google chrome, 然后在IE8.上尝试。

最佳回答

它肯定是联合材料。 PHP是一种服务器式的语文,这意味着它只得在服务器上工作......同样的内容被送至客户,而不管他们使用什么浏览器。 尽管如此,我不知道一下一下一下哪里错误具体出现在你的联合材料中。 你们为什么不利用 j? 摆脱这种状况

document.getElementById("charCounter").innerHTML

改为

$( #charCounter ).html(...)

例如: j 为交叉浏览器兼容而设,尽可能使用。

问题回答

暂无回答




相关问题
Brute-force/DoS prevention in PHP [closed]

I am trying to write a script to prevent brute-force login attempts in a website I m building. The logic goes something like this: User sends login information. Check if username and password is ...

please can anyone check this while loop and if condition

<?php $con=mysql_connect("localhost","mts","mts"); if(!con) { die( unable to connect . mysql_error()); } mysql_select_db("mts",$con); /* date_default_timezone_set ("Asia/Calcutta"); $date = ...

定值美元

如何确认来自正确来源的数字。

Generating a drop down list of timezones with PHP

Most sites need some way to show the dates on the site in the users preferred timezone. Below are two lists that I found and then one method using the built in PHP DateTime class in PHP 5. I need ...

Text as watermarking in PHP

I want to create text as a watermark for an image. the water mark should have the following properties front: Impact color: white opacity: 31% Font style: regular, bold Bevel and Emboss size: 30 ...

How does php cast boolean variables?

How does php cast boolean variables? I was trying to save a boolean value to an array: $result["Users"]["is_login"] = true; but when I use debug the is_login value is blank. and when I do ...

热门标签