Problemas con sistema de usuarios ligoverto Machacateclados Mensajes: 195 Desde: 08/Nov/2008 20/Sep/2009 15:09 GMT+1 RE: Problemas con sistema de usuarios Estas usando las sesiones despues del header?. Las sesiones tienen que ir antes QUE TODO. Si no te dara problemas. Pon el codigo a ver como lo tienes. Saludos.
aerialss88 Machacateclados Mensajes: 269 Desde: 13/Ene/2009 20/Sep/2009 17:04 GMT+1 RE: Problemas con sistema de usuarios No te entiendo...
De aki sake el registro: http://www.php-hispano.net/archivos[....]stema-de-registro-de-usuarios1.html
Aki lo tengo sin plantilla y funciona;
login.
Registrarse.
Reg.php
Lo del principio es todo lo de la plantilla aplicada k tengo con macromedia dreamwer 8, casi al final tengo el codigo en rojo
Spoiler:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html><!-- InstanceBegin template="/Templates/index.dwt" codeOutsideHTMLIsLocked="false" --> <head> <!-- InstanceBeginEditable name="doctitle" --> <title>Registrate!</title> <!-- InstanceEndEditable --> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <script language="JavaScript"> <!-- function MM_reloadPage(init) { //reloads the window if Nav4 resized if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) { document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }} else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload(); } MM_reloadPage(true); // --> <script language="JavaScript"> <!-- function MM_reloadPage(init) { //reloads the window if Nav4 resized if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) { document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }} else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload(); } MM_reloadPage(true); // --> </script> <style> BODY {SCROLLBAR-FACE-COLOR: #666666; SCROLLBAR-HIGHLIGHT-COLOR: #666666; SCROLLBAR-SHADOW-COLOR: #999999; SCROLLBAR-3DLIGHT-COLOR: #FFFFFF; SCROLLBAR-ARROW-COLOR: #000000; SCROLLBAR-TRACK-COLOR: #6699CC; SCROLLBAR-DARKSHADOW-COLOR: #666666; } #Layer7 { position:absolute; width:200px; height:20px; z-index:7; left: 3px; top: -21px; } body,td,th { color: #FFFFFF; } a:link { color: #0000FF; text-decoration: none; } a:visited { text-decoration: none; color: #000000; } a:hover { text-decoration: underline; color: #FFFFFF; } a:active { text-decoration: none; color: #0000FF; } h1,h2,h3,h4,h5,h6 { font-family: Arial, Helvetica, sans-serif; } h1 { font-size: 18px; } #Layer11 { position:absolute; width:200px; height:44px; z-index:7; left: 188px; top: 653px; } #Layer12 { position:absolute; width:102px; height:26px; z-index:8; left: 106px; top: 118px; } </style> <!-- InstanceBeginEditable name="head" --><!-- InstanceEndEditable --> </head> <body bgcolor="#666666" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"> <div id="Layer1" style="position:absolute; width:800px; height:153px; z-index:1"><img src="top.jpg" width="800" height="153"></div> <div id="Layer2" style="position:absolute; width:144px; height:243; z-index:2; left: 0px; top: 205px"><img src="menubg.jpg" width="144" height="243"> <div id="Layer4" style="position:absolute; width:90px; height:20px; z-index:2; left: 24px; top: 19px"> <div align="center"><b><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Menu.</font></b> </div> </div> <div id="Layer3" style="position:absolute; width:110px; height:115px; z-index:1; left: 20px; top: 50px"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><a href="index.html">Inicio.</a><br> <a href="mejores-videos_.html">Los mejores videos.</a><br> <a href="humor_.html">Humor</a>. <br> <a href="curioso_.html">Cosas curiosas</a>.<br> <a href="movil_.html">Para tu movil.</a><br> <a href="tuweb_.html">Para tu web.</a><br> <a href="contacto.php">Contacto</a>.<br> <a href="favoritos.html">Favoritos web.</a><br> <a href="info.html">Informacion</a><a href="info.html"> web</a><br> <a href="#"></a> </font></div> </div> <div id="Layer6" style="position:absolute; width:535px; height:30px; z-index:4; left: 191px; top: 223px"><img src="bodyheader.jpg" width="555" height="37"></div> <div id="Layer8" style="position:absolute; width:144; height:243; z-index:6; left: 0px; top: 440px"><img src="menubg.jpg" width="144" height="243"> <div id="Layer10" style="position:absolute; width:100px; height:25px; z-index:2; left: 20px; top: 19px"> <div align="center"><b><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Más Cosas. </font></b></div> </div> <div id="Layer9" style="position:absolute; width:110px; height:115px; z-index:1; left: 20px; top: 50px"><a href="counter_.html">Counter strike.</a><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><br> <a href="imagenes.php"></a><a href="descargas_.html">Descargas</a>.<br> <a href="afiliados.html">Afiliados</a>.<br> <a href="libro.php">Libro de visitas</a>. <br> <a href="login.php">Login</a>.<br> <a href="reg.php">Registrate</a>. <br> <a href="#"></a> <br> <a href="#"></a> </font></div> </div> <div id="Layer5" style="position:absolute; width:524px; height:385px; z-index:3; left: 206px; top: 264px; overflow: auto"><!-- InstanceBeginEditable name="EditRegion1" --> <p><? include('config.php'); //incluimos el config.php que contiene los datos de la conexión a la db //Creamos el form k irá a registrar.php para comprobar y introducir los datos a la tabla users echo '<form action="registrar.php" method="POST"> Nick: <input type="text" name="nick" size="30"><br> Password: <input type="password" name="pass" size="30" ><br> Repetir Password: <input type="password" name="pass1" size="30" ><br> email: <input type="text" name="email" size="50"><br> Rollo: <textarea name="rollo" cols="30" rows="10"></textarea><br> <input type="submit" name="submit" value="Enviar"></form>'; ?> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <!-- InstanceEndEditable --></div> <p> </p> <div id="Layer11"><img src="inferior.JPG" width="555" height="37"></div> <p> </p> <p> </p> </body> <!-- InstanceEnd --></html>
Editado por ligoverto , Domingo, 20 de Septiembre de 2009, 18:05 ligoverto Machacateclados Mensajes: 195 Desde: 08/Nov/2008 20/Sep/2009 17:57 GMT+1 RE: Problemas con sistema de usuarios Lo de siempre, si te da un error, copia el mismo...
Por lo que dices, el problema sera que te sale algo del header y la salida ¿verdad? PHP entiende salida cualquier cosa que vaya a salir en html, así que si haces:
Código:
Eso, es salida, pues ya ha generado algo de salida html.
Veamos, el hecho de que en un sitio te den un código, no significa que este 100% correcto, para eso estas tu.
NoSetup.org @man / @woman Usuario PRO Mensajes: 26.963 Desde: 01/Mar/2003 20/Sep/2009 19:13 GMT+1 RE: Problemas con sistema de usuarios Sto tambien puede funcionar;
<?php include ( "login.php" ); ?>
??¿¿¿¿
Me dara fallos aun asi.......
O mejor cambio de plantilla?
ligoverto Machacateclados Mensajes: 195 Desde: 08/Nov/2008 21/Sep/2009 18:11 GMT+1 RE: Problemas con sistema de usuarios Escrito originalmente por ligoverto
Sto tambien puede funcionar;
<?php include ( "login.php" ); ?>
??¿¿¿¿
Me dara fallos aun asi.......
O mejor cambio de plantilla?
¿Sabes para que sirve un include?
¿Has entendido lo que te he explicado sobre lo que PHP entiende por salida?
NoSetup.org @man / @woman Usuario PRO Mensajes: 26.963 Desde: 01/Mar/2003 21/Sep/2009 19:22 GMT+1 RE: Problemas con sistema de usuarios explicamelo si no es molestia...
ligoverto Machacateclados Mensajes: 195 Desde: 08/Nov/2008 22/Sep/2009 18:42 GMT+1 RE: Problemas con sistema de usuarios www.php.net
include
Una vez lo has leído me indicas que explicación necesitas.
NoSetup.org @man / @woman Usuario PRO Mensajes: 26.963 Desde: 01/Mar/2003 22/Sep/2009 20:08 GMT+1