<? include 'config.php'; include 'partes.php'; $nome = $_POST['nome']; $senha = $_POST['senha']; $y = mysql_query(" SELECT * FROM servidores WHERE nome = '$nome'") while($x = mysql_fetch_array($y)){ if($senha == $x['senha']) { echo $inicio; echo $meio; echo ' <TH class=titlemedium align=middle width="93%" bgcolor="#C2CFDF">Editar Servidor</TH> </TR> <TR> <TD class=row4 align=middle> <form name=register onsubmit="return checkData()" method="POST" action="editar_sv_code.php?id='.$x['id'].'"> <table border="0" width="100%"> <tr> <td width="50%"> <p align="right">Banner:</td> <td width="50%" align="left"><input name="banner" value="'.$x['banner'].'" size="20" style="font-size: 11 px">(Não Requerido) Tamanho: 468x60</td> </tr> <tr> <td width="50%"> <p align="right">Site:</td> <td width="50%" align="left"><input class=myctl name="homepage" value="'.$x['homepage'].'" size="20" style="font-size: 11 px">Não coloque o "http://"</td> </tr> <tr> <td width="50%"> <p align="right">Descrição:</td> <td width="50%" align="left"><!--webbot bot="Validation" B-Value-Required="TRUE" I-Maximum-Length="150" --><input class=myctl name="descricao" value="'.$x['descricao'].'" size="20" style="font-size: 11 px" maxlength="150"></td> </tr> <tr> <td width="50%"></td> <td width="50%" align="left"><input class=myctl type="submit" value="Registrar" name="action"></td> <script language=JavaScript> <!-- function checkData () { // Validation functions obtained from: // http://www.devshed.com/c/a/JavaScript/Form-Validation-with-JavaScript/7/ // check to see if input is numeric function isNumeric(val) { if (val.match(/^[0-9]+$/)) { return true; } else { return false; } } // check to see if input is alphanumeric function isAlphaNumeric(val) { if (val.match(/^[a-zA-Z0-9]+$/)) { return true; } else { return false; } } // check to see if input is a valid email address function isEmailAddress(val) { if (val.match(/^([a-zA-Z0-9])+([.a-zA-Z0-9_-])*@([a-zA-Z0-9_-])+(.[a-zA-Z0-9_-]+)+/)) { return true; } else { return false; } } banner = document.register.banner.value; homepage = document.register.homepage.value; descricao = document.register.descricao.value; if (!homepage || homepage.length < 10 || homepage.length > 80) { alert("O endereço do site precisa ter entre 10 e 80 caracteres."); return false; } if (!descricao || descricao.length < 30 || descricao.length > 400) { alert("A descrição precisa ter entre 30 e 400 caracteres."); return false; } return true; } // --> </SCRIPT> </tr> </table> </form>'; echo $final; }else{ echo $inicio; echo $meio; echo ' <TH class=titlemedium align=middle width="93%" bgcolor="#C2CFDF">Erro</TH> </TR> <TR> <TD class=row4 align=middle> <p align="center"><font color="#FF0000">Você digitou a senha incorretamente. Verifique o seu Caps Lock</a></font>'; echo $final; } ?>
E alguem pode me ensinar a perimitir entrada no site uma vez por dia por IP?? e não por COOKIE...
Grato