Fóruns sobre PHP, JavaScript, HTML, MySQLi, jQuery, Banco de Dados, CSS


Moderador: web

 
Mais de 100 postagens
Mais de 100 postagens
Tópico Autor
Mensagens: 383
Sexo: Masculino
Localização: criciuma

Problema em script de cadastro

09-12-2009 23:47

ola galera. seguinte. fiz um script aki mas na parte de usuarios. no caso cadastrar ou alterar o usuario quando coloco as informações ele simplismente nao faz nada. fica a pagina em branco. nao eh permissões pq esta rodando em localhost. acho tbm ki nao eh o banco de dados. dei uma olhada e esta tudo OK.

caduser.php
<?php //inicia a sessao session_start(); include("check.inc"); include("func.inc"); //--------------------- //conexao com banco de dados include("conec.inc"); //atribuição de variaveis $scod = $HTTP_GET_VARS["scod"]; $msg = $_REQUEST["msg"]; $op = $_REQUEST["op"]; //--------------------------------------- ?> <html> <head> <title>Administra&ccedil;&atilde;o do Site</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <?php include ("estilos.php");?> </head> <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"> <center> <table width="782" border="0" cellspacing="4" cellpadding="4"> <tr> <td><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td colspan="2"><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td colspan="3"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="782" height="95"> <param name="movie" value="../fla/superior.swf"> <param name="quality" value="high"> <embed src="../fla/superior.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="782" height="95"></embed></object></td> </tr> <tr> <td colspan="3"><img src="../img/linhapreta782.jpg" width="782" height="1"></td> </tr> <tr> <td width="33%" colspan="2" align="right">&nbsp;</td> <td width="53%" align="center">&nbsp;</td> </tr> <tr> <td colspan="3"><img src="../img/linhapreta782.jpg" width="782" height="1"></td> </tr> <tr bgcolor="#B7FFB7"> <td width="33%" align="left">&nbsp;&nbsp;<b>Área Administrativa</b></td> <td width="33%" align="center">&nbsp;</td> <td width="44%" align="right"><?php echo $data=data();?>&nbsp;&nbsp;</td> </tr> <tr> <td colspan="3"><img src="../img/linhapreta782.jpg" width="782" height="1"></td> </tr> </table></td> </tr> <tr> <td width="21%" valign="top"><?php include("menu.php");?></td> <td width="79%" valign="top"> <div align="center"> <table width="95%" border="0" cellspacing="0" cellpadding="0"> <tr> <td><div align="center"><font color="#333333" size="2" face="Arial, Helvetica, sans-serif"><strong><br> </strong></font> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td bgcolor="#5EE16F"> <div align="left"><font color="#333333" size="2" face="Arial, Helvetica, sans-serif"><strong>&nbsp;&nbsp;<font color="#FFFFFF">CADASTRO DE USU&Aacute;RIO </font></strong></font></div></td> </tr> </table> <font color="#333333" size="2" face="Arial, Helvetica, sans-serif"><strong> </strong></font></div></td> </tr> <tr> <td><div align="center"> <form name="form1" method="post" action="reguser.php"> <table width="100%"> <tr> <td colspan="2" align="center" >&nbsp;</td> </tr> <tr> <td >&nbsp;</td> <td >&nbsp;</td> </tr> <tr> <td width="41%" ><div align="right">Nome</div></td> <td width="59%" ><input name="nomeusuario" type="TEXT" id="nomeusuario" > </td> </tr> <tr> <td ><div align="right">Email</div></td> <td ><input name="mailusuario" type="TEXT" id="mailusuario" > </td> </tr> <tr> <td ><div align="right">Confirma&ccedil;&atilde;o Email</div></td> <td ><input name="confemail" type="TEXT" id="confemail" > </td> </tr> <tr> <td ><div align="right">Nome de Usu&aacute;rio</div></td> <td ><input name="usuario" type="TEXT" id="usuario" > </td> </tr> <tr> <td colspan="2" ><input name="scod" type="hidden" id="scod" value="<?php echo $scod;?>"> <input name="op" type="hidden" value="<?php echo $op;?>"> </td> </tr> <tr> <td colspan="2" ><div align="center">&nbsp; <input name="reset" type="reset" id="reset" value="Limpar" > &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <input type="submit" value="Cadastrar" name="Submit"> </div></td> </tr> </table> </form> </div></td> </tr> <tr> <td><div align="center"></div></td> </tr> </table> </div></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> </tr> </table></td> </tr> </table> <p>&nbsp;</p> </center> </body> </html>

altcaduser.php
<?php //inicia a sessao session_start(); include("check.inc"); include("func.inc"); //--------------------- //conexao com banco de dados include("conec.inc"); //atribuição de variaveis $scod = $HTTP_GET_VARS["scod"]; $op = $HTTP_GET_VARS["op"]; $userid = $HTTP_GET_VARS["userid"]; //--------------------------------------- ?> <html> <head> <title>Administra&ccedil;&atilde;o do Site</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <?php include ("estilos.inc");?> </head> <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"> <center> <table width="782" border="0" cellspacing="4" cellpadding="4"> <tr> <td><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td colspan="2"><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td colspan="2"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="782" height="95"> <param name="movie" value="../fla/superior.swf"> <param name="quality" value="high"> <embed src="../fla/superior.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="782" height="95"></embed></object></td> </tr> <tr> <td colspan="2"><img src="../img/linhapreta782.jpg" width="782" height="1"></td> </tr> <tr> <td align="right">&nbsp;</td> <td align="center">&nbsp;</td> </tr> <tr> <td colspan="2"><img src="../img/linhapreta782.jpg" width="782" height="1"></td> </tr> <tr bgcolor="#B7FFB7"> <td width="19%">&nbsp;&nbsp;<b>Área Administrativa</b></td> <td width="81%" align="right"><?php echo $data=data();?>&nbsp;</td> </tr> <tr> <td colspan="2"><img src="../img/linhapreta782.jpg" width="782" height="1"></td> </tr> </table></td> </tr> <tr> <td width="21%" valign="top"><?php include("menu.php"); ?> </td> <td width="79%" valign="top" align="center"> <table width="95%" border="0" cellspacing="0" cellpadding="0"> <tr> <td><div align="center"><font color="#333333" size="2" face="Arial, Helvetica, sans-serif"><strong><br> </strong></font> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td bgcolor="#5EE16F" align ="left"> <font color="#333333" size="2" face="Arial, Helvetica, sans-serif"> <strong>&nbsp;&nbsp;ALTERA&Ccedil;&Atilde;O DO CADASTRO DE USU&Aacute;RIO </strong> </font> </td> </tr> </table> <font color="#333333" size="2" face="Arial, Helvetica, sans-serif"></td> </tr> <tr> <td align="center" valign="top"> <form name="form1" method="post" action="reguser.php"> <table width="100%"> <?php $query = "select userid, nomeusuario, mailusuario, usuario, activated from users where userid ='$userid' and controle ='1'"; $res = mysql_query($query, $conec) or die(mysql_error()); while($row = mysql_fetch_array($res)) { ?> <tr> <td width="41%" align="right">Nome </td> <td width="59%" > <input name="nomeusuario" type="TEXT" value="<?php echo $row[1];?>"> </td> </tr> <tr> <td align="right">Email </td> <td > <input name="mailusuario" type="TEXT" value="<?php echo $row[2];?>" > </td> </tr> <tr> <td align="right">Confirma&ccedil;&atilde;o Email</td> <td > <input name="confemail" type="TEXT" value="<?php echo $row[2];?>"> </td> </tr> <tr> <td align="right"></td> </tr> <tr> <td align="right">Nome de Usu&aacute;rio </td> <td ><input name="usuario" type="TEXT" value="<?php echo $row[3];?>" ></td> </tr> <tr> <td align="right">Ativado:</td> <td ><select name="ativado" > <?php if($row[4] == '1') { echo " <option value=\"".$row[4]."\" selected>Ativo</option>"; echo " <option value=\"0\">Inativo</option>"; } else { echo " <option value=\"".$row[4]."\" selected>Inativo</option>"; echo " <option value=\"1\">Ativo</option>"; } ?> </select> </td> </tr> <tr> <td colspan="2" > <input name="scod" type="hidden" value ="<?php echo $scod;?>"> <input name="op" type="hidden" value ="<?php echo $op;?>"> <input name="userid" type="hidden" id="userid" value ="<?php echo $userid;?>"></td> </tr> <tr> <td colspan="2" ><div align="center">&nbsp; <input name="reset" type="reset" value="Limpar" > &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <input type="submit" value="Atualizar" name="Submit"> </div></td> </tr> <?php }?> </table> </form> </td> </tr> <tr> <td></td> </tr> </table> </td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> </tr> </table></td> </tr> </table> <p>&nbsp;</p> </center> </body> </html>

arquivo ki recebe as informações

regusuario.php

<?php //inicia a sessao session_start(); include("check.inc"); include("func.inc"); //--------------------- //conexao com banco de dados include("conec.php"); //------------------------------------------------------------------- //atribuição de variaveis $nomeusuario = $HTTP_POST_VARS["nomeusuario"]; $mailusuario = $HTTP_POST_VARS["mailusuario"]; $confemail = $HTTP_POST_VARS["confemail"]; $usuario = $HTTP_POST_VARS["usuario"]; $scod = $HTTP_POST_VARS["scod"]; $op= $HTTP_SESSION_VARS['userid']; //------------------------------------------------------------------------- // formatando dados para banco $nomeusuario = addslashes(strtoupper(trim($nomeusuario))); $mailusuario = addslashes(strtolower(trim($mailusuario))); $confemail = addslashes(strtolower(trim($confemail))); $usuario = addslashes(strtolower(trim($usuario))); //-------------------------------------------------------------------------------- //testando variaveis if((!$nomeusuario) || (!$mailusuario) || (!$usuario)) { if(!$nomeusuario) { ?> <style type="text/css"> <!-- .style2 { font-size: 10px; font-family: Arial, Helvetica, sans-serif; } --> </style> <table width="782" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td colspan="3" class="style2"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="782" height="95"> <param name="movie" value="../fla/superior.swf" /> <param name="quality" value="high" /> <embed src="../fla/superior.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="782" height="95"></embed> </object></td> </tr> <tr> <td colspan="3" class="style2"><img src="../img/linhapreta782.jpg" width="782" height="1" /></td> </tr> <tr> <td align="right" class="style2">&nbsp;</td> <td colspan="2" align="center" class="style2">&nbsp;</td> </tr> <tr> <td colspan="3" class="style2"><img src="../img/linhapreta782.jpg" width="782" height="1" /></td> </tr> <tr bgcolor="#B7FFB7"> <td width="205" align="left" class="style2">&nbsp;&nbsp;<b>&Aacute;rea Administrativa</b></td> <td width="233" align="center" class="style2">&nbsp;</td> <td width="344" align="right" class="style2">&nbsp;&nbsp;</td> </tr> </table> <p align="center" class="style2"><br /> "Nome é informação obrigatória!" <br /> <a href ="caduser.php">Tentar novamente</a> <br /> <? exit(); // sai do script se der erro no login } // verificando endereço de email vazio if (empty($mailusuario) || empty($confemail)) { ?> </p> <table width="782" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td colspan="3" class="style2"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="782" height="95"> <param name="movie" value="../fla/superior.swf" /> <param name="quality" value="high" /> <embed src="../fla/superior.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="782" height="95"></embed> </object></td> </tr> <tr> <td colspan="3" class="style2"><img src="../img/linhapreta782.jpg" width="782" height="1" /></td> </tr> <tr> <td align="right" class="style2">&nbsp;</td> <td colspan="2" align="center" class="style2">&nbsp;</td> </tr> <tr> <td colspan="3" class="style2"><img src="../img/linhapreta782.jpg" width="782" height="1" /></td> </tr> <tr bgcolor="#B7FFB7"> <td width="205" align="left" class="style2">&nbsp;&nbsp;<b>&Aacute;rea Administrativa</b></td> <td width="233" align="center" class="style2">&nbsp;</td> <td width="344" align="right" class="style2">&nbsp;&nbsp;</td> </tr> </table> <p align="center" class="style2"><br /> O endereço de e-mail é obrigatorio! Tente novamente." <br /> <a href ="caduser.php">Tentar novamente</a> <br /> <? exit(); // sai do script se der erro no login } //-------------------- // verificando confirmacao endereço de email if (!($mailusuario === $confemail)) { ?> </p> <table width="782" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td colspan="3" class="style2"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="782" height="95"> <param name="movie" value="../fla/superior.swf" /> <param name="quality" value="high" /> <embed src="../fla/superior.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="782" height="95"></embed> </object></td> </tr> <tr> <td colspan="3" class="style2"><img src="../img/linhapreta782.jpg" width="782" height="1" /></td> </tr> <tr> <td align="right" class="style2">&nbsp;</td> <td colspan="2" align="center" class="style2">&nbsp;</td> </tr> <tr> <td colspan="3" class="style2"><img src="../img/linhapreta782.jpg" width="782" height="1" /></td> </tr> <tr bgcolor="#B7FFB7"> <td width="205" align="left" class="style2">&nbsp;&nbsp;<b>&Aacute;rea Administrativa</b></td> <td width="233" align="center" class="style2">&nbsp;</td> <td width="344" align="right" class="style2">&nbsp;&nbsp;</td> </tr> </table> <p align="center" class="style2"><br /> "O valores digitados para o endereço de e-mail não conferem! Tente novamente." <br /> <a href ="caduser.php">Tentar novamente</a> <br /> <? exit(); // sai do script se der erro no login } //-------------------- // verificando endereço de email incorreto if ((!ereg("^[a-zA-Z0-9_.]+@[a-zA-Z0-9\-]+\.[a-zA-Z0-9\-\.]+$", $mailusuario))or (!ereg("^[a-zA-Z0-9_.]+@[a-zA-Z0-9\-]+\.[a-zA-Z0-9\-\.]+$", $confemail))) { ?> </p> <table width="782" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td colspan="3" class="style2"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="782" height="95"> <param name="movie" value="../fla/superior.swf" /> <param name="quality" value="high" /> <embed src="../fla/superior.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="782" height="95"></embed> </object></td> </tr> <tr> <td colspan="3" class="style2"><img src="../img/linhapreta782.jpg" width="782" height="1" /></td> </tr> <tr> <td align="right" class="style2">&nbsp;</td> <td colspan="2" align="center" class="style2">&nbsp;</td> </tr> <tr> <td colspan="3" class="style2"><img src="../img/linhapreta782.jpg" width="782" height="1" /></td> </tr> <tr bgcolor="#B7FFB7"> <td width="205" align="left" class="style2">&nbsp;&nbsp;<b>&Aacute;rea Administrativa</b></td> <td width="233" align="center" class="style2">&nbsp;</td> <td width="344" align="right" class="style2">&nbsp;&nbsp;</td> </tr> </table> <p align="center" class="style2"><br /> "Endereço de e-mail incorreto! Tente novamente." <br /> <a href ="caduser.php">Tentar novamente</a> <br /> <? exit(); // sai do script se der erro no login } //---------------------------------------------------------------------------- if(!$usuario) { ?> </p> <table width="782" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td colspan="3" class="style2"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="782" height="95"> <param name="movie" value="../fla/superior.swf" /> <param name="quality" value="high" /> <embed src="../fla/superior.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="782" height="95"></embed> </object></td> </tr> <tr> <td colspan="3" class="style2"><img src="../img/linhapreta782.jpg" width="782" height="1" /></td> </tr> <tr> <td align="right" class="style2">&nbsp;</td> <td colspan="2" align="center" class="style2">&nbsp;</td> </tr> <tr> <td colspan="3" class="style2"><img src="../img/linhapreta782.jpg" width="782" height="1" /></td> </tr> <tr bgcolor="#B7FFB7"> <td width="205" align="left" class="style2">&nbsp;&nbsp;<b>&Aacute;rea Administrativa</b></td> <td width="233" align="center" class="style2">&nbsp;</td> <td width="344" align="right" class="style2">&nbsp;&nbsp;</td> </tr> </table> <p align="center" class="style2">"Nome de usuário é informação obrigatoria. Tente novamente." <br /> <a href ="caduser.php">Tentar novamente</a> <br /> <? exit(); // sai do script se der erro no login } } //---------------------------------------------------------------------------------------- // verificando se ja existe email cadastrado $sql_email_check = mysql_query("SELECT mailusuario FROM users WHERE mailusuario='$mailusuario'"); $sql_usuario_check = mysql_query("SELECT usuario FROM users WHERE usuario='$usuario'"); $email_check = mysql_num_rows($sql_email_check); $usuario_check = mysql_num_rows($sql_usuario_check); if(($email_check > 0) || ($usuario_check > 0)){ if($email_check > 0) { unset($mailusuario); ?> </p> <table width="782" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td colspan="3" class="style2"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="782" height="95"> <param name="movie" value="../fla/superior.swf" /> <param name="quality" value="high" /> <embed src="../fla/superior.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="782" height="95"></embed> </object></td> </tr> <tr> <td colspan="3" class="style2"><img src="../img/linhapreta782.jpg" width="782" height="1" /></td> </tr> <tr> <td align="right" class="style2">&nbsp;</td> <td colspan="2" align="center" class="style2">&nbsp;</td> </tr> <tr> <td colspan="3" class="style2"><img src="../img/linhapreta782.jpg" width="782" height="1" /></td> </tr> <tr bgcolor="#B7FFB7"> <td width="205" align="left" class="style2">&nbsp;&nbsp;<b>&Aacute;rea Administrativa</b></td> <td width="233" align="center" class="style2">&nbsp;</td> <td width="344" align="right" class="style2">&nbsp;&nbsp;</td> </tr> </table> <p align="center" class="style2"><br /> Esse endereço de email, já esta cadastrado em nosso banco de dados. Por favor, cadastre um novo endereço de email! <br /> <a href ="caduser.php">Tentar novamente</a> <br /> <? exit(); // sai do script se der erro no login } if($usuario_check > 0) { unset($usuario); ?> </p> <table width="782" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td colspan="3" class="style2"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="782" height="95"> <param name="movie" value="../fla/superior.swf" /> <param name="quality" value="high" /> <embed src="../fla/superior.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="782" height="95"></embed> </object></td> </tr> <tr> <td colspan="3" class="style2"><img src="../img/linhapreta782.jpg" width="782" height="1" /></td> </tr> <tr> <td align="right" class="style2">&nbsp;</td> <td colspan="2" align="center" class="style2">&nbsp;</td> </tr> <tr> <td colspan="3" class="style2"><img src="../img/linhapreta782.jpg" width="782" height="1" /></td> </tr> <tr bgcolor="#B7FFB7"> <td width="205" align="left" class="style2">&nbsp;&nbsp;<b>&Aacute;rea Administrativa</b></td> <td width="233" align="center" class="style2">&nbsp;</td> <td width="344" align="right" class="style2">&nbsp;&nbsp;</td> </tr> </table> <p align="center" class="style2"><br /> Nome de usuario já existe em nosso banco de dados . Por favor, cadastro outro nome!" <br /> <a href ="caduser.php">Tentar novamente</a> <br /> <? exit(); // sai do script se der erro no login } /* gerando senha randomica por questao de seguranca */ function makeRandomPassword() { $salt = "abchefghjkmnpqrstuvwxyz0123456789"; srand((double)microtime()*1000000); $i = 0; while ($i <= 7) { $num = rand() % 33; $tmp = substr($salt, $num, 1); $pass = $pass . $tmp; $i++; } return $pass; } $random_password = makeRandomPassword(); $db_password = md5($random_password); // inserindo dados no banco. $sql = mysql_query("INSERT INTO users (nomeusuario, mailusuario, usuario, password, signup_date, idoperador) VALUES('$nomeusuario', '$mailusuario', '$usuario', '$db_password', now(), '$op')") or die (mysql_error()); if(!$sql) { ?> </p> <table width="782" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td colspan="3" class="style2"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="782" height="95"> <param name="movie" value="../fla/superior.swf" /> <param name="quality" value="high" /> <embed src="../fla/superior.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="782" height="95"></embed> </object></td> </tr> <tr> <td colspan="3" class="style2"><img src="../img/linhapreta782.jpg" width="782" height="1" /></td> </tr> <tr> <td align="right" class="style2">&nbsp;</td> <td colspan="2" align="center" class="style2">&nbsp;</td> </tr> <tr> <td colspan="3" class="style2"><img src="../img/linhapreta782.jpg" width="782" height="1" /></td> </tr> <tr bgcolor="#B7FFB7"> <td width="205" align="left" class="style2">&nbsp;&nbsp;<b>&Aacute;rea Administrativa</b></td> <td width="233" align="center" class="style2">&nbsp;</td> <td width="344" align="right" class="style2">&nbsp;&nbsp;</td> </tr> </table> <p align="center" class="style2"><br /> Não foi possivel criar a sua conta, por favor, entre em contato como webmaster." <br /> <a href ="caduser.php">Tentar novamente</a> <br /> <? exit(); // sai do script se der erro no login } else { $userid = mysql_insert_id(); // Let's mail the user! $subject = "Seu cadastro!"; $message = "$nomeusuario, Agradeçemos o seu registro! Esta é uma resposta automatica, por favor nao responda!"; mail($mailusuario, $subject, $message, "From: Webmaster<webmaster@site.com.br>\n X-Mailer: PHP/" . phpversion()); ?> </p> <table width="782" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td colspan="3" class="style2"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="782" height="95"> <param name="movie" value="../fla/superior.swf" /> <param name="quality" value="high" /> <embed src="../fla/superior.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="782" height="95"></embed> </object></td> </tr> <tr> <td colspan="3" class="style2"><img src="../img/linhapreta782.jpg" width="782" height="1" /></td> </tr> <tr> <td align="right" class="style2">&nbsp;</td> <td colspan="2" align="center" class="style2">&nbsp;</td> </tr> <tr> <td colspan="3" class="style2"><img src="../img/linhapreta782.jpg" width="782" height="1" /></td> </tr> <tr bgcolor="#B7FFB7"> <td width="205" align="left" class="style2">&nbsp;&nbsp;<b>&Aacute;rea Administrativa</b></td> <td width="233" align="center" class="style2">&nbsp;</td> <td width="344" align="right" class="style2">&nbsp;&nbsp;</td> </tr> </table> <p align="center" class="style2"><br /> As informações para a ativação do cadastro foram enviado para o seu email do usuário!" <br /> <a href ="caduser.php">Tentar novamente</a> <br /> <? exit(); // sai do script se der erro no login } } ?> </p>

desde ja agradeço.
0
 
Avatar do usuário
ADMIN
ADMIN
Mensagens: 17735
Nome: Kleber
Descrição do site: Onde você encontra scripts grátis para o seu site
Sexo: Masculino
Localização: RJ / RJ / Brasil
Contato:

Problema em script de cadastro

10-12-2009 12:16

O que observei foi que você não aplicou o value="" nos inputs. É necessário.

Seu script na parte que armazena o valor vindo do form, está em PHP4 ainda

$HTTP_GET_VARS["scod"];

O correto é vir por GET ou POST, ex:

$_POST['scod']

0
A melhor hospedagem para o seu site HostGator!

Quem está online

Usuários navegando neste fórum: Bing [Bot]