crear formulario de registro

  • Autor Autor exe8422
  • Fecha de inicio Fecha de inicio

exe8422

Delta
Redactor
Verificación en dos pasos activada
¡Usuario con pocos negocios! ¡Utiliza siempre saldo de Forobeta!
Hola, alguién sabe como puedo hacer para agregar:Captcha, reglas y condiciones?, quiero que mi formulario quede como en este topic:http://forobeta.com/php/173913-formulario-de-registro.html

Este es el codigo completo:

PHP:
<?php
 /*=======================================================================*\
 | phpSpring - The Formspring Clone Project [version 1.0] [build 1.5.2]   | 
 | ====================================================================== |
 | Copyright (c) 2012, Leo 'Met0do' - http://www.met0do.org               |
 | For more stuffs and data, http://www.met0do.org - leo@met0do.org       |
 | ====================================================================== |
 | This program is free software: you can redistribute it and/or modify   |
 | it under the terms of the GNU General Public License as published by   |
 | the Free Software Foundation, either version 3 of the License, or      |
 | (at your option) any later version.                                    |
 | ====================================================================== |
 | This program is distributed in the hope that it will be useful,        |
 | but WITHOUT ANY WARRANTY; without even the implied warranty of         |
 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the           |
 | GNU General Public License for more details.                           |
 \*=======================================================================*/
 
  /* requeriments */
  require_once 'met0do.org.php';
  
  /* security */
  if($_SESSION["online"]){ header('Location: http://'.SITE_DOMAIN.'/account/inbox'); }
  
  /* header stuff */
  getPageHeader("Signup");
  
  /* css stuff */
  getPageCssStyle("register");
  
  /* js stuff */
  echo('<script type="text/javascript" src="js/prototype.js"></script>
  <script type="text/javascript" src="js/scriptaculous.js"></script>
  <script type="text/javascript" src="js/site.js"></script>
  <script type="text/javascript" src="js/search.js"></script>
  <script type="text/javascript" src="js/settings.js"></script>
  <script type="text/javascript" src="js/inbox.js"></script>
  <script type="text/javascript" src="js/profile.js"></script>
  <script type="text/javascript" src="js/color_picker.js"></script>');
  
  /* menus stuff */
  getPageMenus();
  
  /* actions */
  if($_SERVER['REQUEST_METHOD'] == "POST"){
	  $receivedData["username"] = filterText(ucfirst(strtolower($_POST["username"])));
	  $receivedData["name"]     = filterText($_POST["name"]);
	  $receivedData["pass"]     = filterText($_POST["password"]);
	  $receivedData["email"]    = filterText($_POST["email"]);
	  createNewUser($receivedData);
  }
  
  /* check pages of the register */
  if(!$_SESSION["register_complete"]) {
?>

  <div id="content">
    <noscript><div class="error"><b>ERROR:</b> JavaScript is not enabled. You must enable JavaScript to use the application.</div></noscript>
    <h2>Create Your Account</h2>
    <form method="post" action="account/signup" id="setupForm" onsubmit="return setupComplete()">
      <label for="username">Username</label><br />
      <input type="text" name="username" id="username" size="40" class="w40" maxlength="15" value="" />
      <span id="usernameStatus"></span><br />
      <span class="supporting">Your page will be http://<?php echo SITE_DOMAIN; ?>/username</span><br /><br />
      <label for="password">Password</label><br />
      <input type="password" name="password" id="password" size="40" class="w40" />
      <span id="passwordStatus"></span><br /><br />
      <label for="password2">Confirm Password</label><br />
      <input type="password" name="password2" id="password2" size="40" class="w40" /><br /><br />
      <label for="name">Name</label><br />
      <input type="text" name="name" id="name" size="40" class="w40" maxlength="60" value="" /><br /><br />
      <label for="email">Email</label><br />
      <input type="text" name="email" id="email" size="40" class="w40" value="" />
      <span id="emailStatus"></span><br />
      <span class="supporting">e.g. leo@met0do.org</span><br /><br />
      <input type="checkbox" name="terms" id="terms" value="1"  />
      <label id="termsLabel" for="terms">I agree to the <a href="site/terms" target="_blank">Terms of Service</a></label><br />
      <input type="submit" name="submit" value="Signup" class="submit" />
    </form>
  </div>
</div>

<?php } else { unset($_SESSION["register_complete"]); ?>

<div id="content">
    <noscript><div class="error"><b>ERROR:</b> JavaScript is not enabled. You must enable JavaScript to use the application.</div></noscript>
    <h2>Create Your Account</h2>
    <p>Your account has successfully been created, <a href="account/login">click here</a> to login to your account and start to ask your friends and who you care about.</p>  </div>
</div>

<?php } getPageFooter(); ?>