Ver Mensaje Individual
  #13 (permalink)  
Antiguo 02/02/2009, 07:14
Avatar de Ronruby
Ronruby
 
Fecha de Ingreso: julio-2008
Ubicación: 18°30'N, 69°59'W
Mensajes: 4.879
Antigüedad: 15 años, 10 meses
Puntos: 416
Respuesta: por que se ve mi página asi?? (hay algo de urgencia)

Tienes un error en la linea 32. (Si es que no fue el foro que agrego ese espacio).
Dice $_POS T.

Código php:
Ver original
  1. <?php
  2.  
  3. include("config.php");
  4.  
  5. error_reporting(E_ALL ^ E_NOTICE);
  6.  
  7.  
  8. $msg = Array();
  9. $error = Array();
  10.  
  11. function addUser(){
  12. if (empty($_POST)) return false;
  13. global $config, $msg, $error;
  14. if (empty($_POST['login'])) $error[] = 'Error, You forgot to enter a account name!';
  15. if (empty($_POST['password'][0]) || empty($_POST['password'][1])) $error[] = 'Error, You forgot to enter a password!';
  16. if ($_POST['password'][0] !== $_POST['password'][1]) $error[] = 'Password does not match!';
  17. if (!empty($error)) return false;
  18. $db = @mysql_connect($config['mysql_host'], $config['mysql_user'], $config['mysql_pass']);
  19. if (!$db) return $error[] = 'Database: '.mysql_error();
  20. if (!@mysql_select_db($config['mysql_dbname'], $db)) return $error[] = 'Database: '.mysql_error();
  21. $query = "SELECT `acct` FROM `accounts` WHERE `login` = '".mysql_real_escape_string($_POST['login'])."'";
  22. $res = mysql_query($query, $db);
  23. if (!$res) return $error[] = 'Database: '.mysql_error();
  24. if (mysql_num_rows($res) > 0) return $error[] = 'Username already in use.';
  25. //Modified by Jerq
  26. $query = "INSERT INTO `accounts` (`login`,`password`,`lastip`, `flags`) VALUES ('".mysql_real_escape_string($_POST['login'])."', '".mysql_real_escape_string($_POST['password'][0])."', '".$_SERVER['REMOTE_ADDR']."','".mysql_real_escape_string($_POST['tbc'][0])."')";
  27. //Modified by Jerq
  28.  
  29. $res = mysql_query($query, $db);
  30. if (!$res) return $error[] = 'Database: '.mysql_error();
  31. $msg[] = 'The Account <span style="color:#00FF00"><strong>'.htmlentities($_POS T['login']).'</strong></span> has been created!';
  32. return true;
  33. }
  34.  
  35. addUser();
  36. {
  37.  
  38. ?>
  39.  
  40. <html xmlns="http://www.w3.org/1999/xhtml" >
  41. <head>
  42. <title>Pagina de registro de cuentas</title>
  43. <meta http-equiv="Pragma" content="no-cache"/>
  44. <meta http-equiv="Cache-Control" content="no-cache"/>
  45. <style type="text/css" media="screen">
  46. @import url(server_stats.css);.Estilo1 {color: #000000}
  47. .Estilo2 {color: #1B1B1B}
  48. </style>
  49. <!--[if lt IE 7.]>
  50. <script defer type="text/javascript" src="pngfix.js"></script>
  51. <![endif]-->
  52. </head>
  53. <body>
  54.  
  55. <center>
  56. <div class="logo">
  57. <p>&nbsp;</p>
  58. <p>&nbsp;</p>
  59. </div>
  60. <div style="width:300px">
  61. <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="POST">
  62. <table width="100%" border="0" cellspacing="1" cellpadding="3">
  63. <tr class="head"><th colspan="2"><span class="Estilo2">Creacion de Cuentas</span></th></tr>
  64. <tr>
  65. <th><span class="Estilo1">Nombre de usuario: </span></th>
  66. <td align="center"><input class="button" type="text" name="login" size="30" maxlength="16"/></td>
  67. </tr>
  68. <tr>
  69. <th><span class="Estilo1">Contraseña: </span></th>
  70. <td align="center"><input class="button" type="password" name="password[]" size="30" maxlength="16"/></td>
  71. </tr>
  72. <tr>
  73. <th><input name="button" type="button" class="button" onClick="history.go(-1)" value="Atras" /></th>
  74. <td align="center"><input name="Input" type="submit" class="button" onClick="go to lista de precios.php" value="entrar"/></td>
  75. </tr>
  76. <tr>
  77. <th height="25">&nbsp;</th>
  78. <td align="center">&nbsp;</td>
  79. </tr>
  80.  
  81. <th height="25">&nbsp;</th>
  82. <td align="center">&nbsp;</td>
  83. </table>
  84. </form>
  85.  
  86. <?php
  87. if (!empty($error)){
  88. echo '<table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td class="error" align="center">';
  89. foreach($error as $text)
  90. echo $text.'</br>';
  91. echo '</td></tr></table>';
  92. };
  93. if (!empty($msg)){
  94. echo '<table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td align="center">';
  95. foreach($msg as $text)
  96. echo $text.'</br>';
  97. echo '</td></tr></table>';
  98. exit();
  99. };
  100. ?>
  101. </div>
  102. </center>
  103.  
  104. <p style="width: 220px; font-weight: bold; color: #29b503; font-family: tahoma, arial, sans; font-size: 13px;">
  105.  
  106. <p style="width: 220px; font-weight: bold; color: #29b503; font-family: tahoma, arial, sans; font-size: 13px;"><br />
  107. <br />
  108. <br />
  109. </body>
  110. </html>

Crea un archivo .php con lo siguiente:
Código PHP:
<?php
phpinfo
();
?>