HTML Tutorial


 Forum HomeForum Home   FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
RegisterRegister - Not registered yet? Got something to say? Join HTML Code Tutorial!
Registration Form Code
Post new topic   Reply to topic    HTML Help Forum Index -> ASP
View previous topic :: View next topic  
Author Message
veasna



Joined: 15 May 2007
Posts: 56

PostPosted: Tue Nov 06, 2007 6:35 pm     Registration Form Code Reply with quote

I have my personal website. And I want to create

User Account Form to give permittion view my inside

content. Can you tell me about the codes for

Registration Form? Sample like hi5.com or yahoo.com

Whatever you think it's better and popular for

Registration Form.

PS: My website is for personal use only, non-

commercial. Just want to let friends create their

account to view my content only.
Corey Bryant
Site Admin


Joined: 15 May 2004
Posts: 8749
Location: Castle Pines North, CO USA

PostPosted: Wed Nov 07, 2007 3:01 pm     Reply with quote

Spooky Login is one that I have used in the past. There are others listed on ASP Scripts: User Management.

_________________
Corey
Toll Free Numbers | SiteMaps for Search Engines
veasna



Joined: 15 May 2007
Posts: 56

PostPosted: Wed Nov 07, 2007 11:38 pm     Reply with quote

Is there any free for that?
Corey Bryant
Site Admin


Joined: 15 May 2004
Posts: 8749
Location: Castle Pines North, CO USA

PostPosted: Thu Nov 08, 2007 5:02 am     Reply with quote

Look through there - there are some free ones but you need to look through that link and locate the one that suits your needs.

_________________
Corey
Toll Free Fax Numbers | Mile High Merchant Accounts | Expression Web Blog
babbal



Joined: 04 Feb 2009
Posts: 4

PostPosted: Wed Feb 04, 2009 11:47 pm     Reply with quote

Form page source (registration_f.php)

Code:

<?php include('vdaemon.php'); ?>
<html>
<head>
<title>Registration Form Sample</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="samples.css" rel="stylesheet" type="text/css">
</head>
<body>
<h1>Registration Form Sample</h1>
<form id="Register" action="registration_p.php" method="POST" runat="vdaemon" disablebuttons="all">
  <table cellpadding="2" cellspacing="0" border="0">
    <tr>
      <td width="130">
        <vllabel validators="UserID,UserIDExist" errclass="error" for="UserID" cerrclass="controlerror">User ID:</vllabel>
      </td>
      <td width="140">
        <input name="UserID" type="text" class="control" id="UserID" size="15">
        <vlvalidator name="UserID" type="required" control="UserID" errmsg="User ID required">
        <vlvalidator name="UserIDExist" type="custom" control="UserID" errmsg="User ID already exist" function="UserIDCheck">
      </td>
      <td width="300" rowspan="7" valign="top">
        <vlsummary class="error" headertext="Error(s) found:" displaymode="bulletlist">
      </td>
    </tr>
    <tr>
      <td>
        <vllabel errclass="error" validators="Password,PassCmp" for="Password" cerrclass="controlerror">Password:</vllabel>
      </td>
      <td>
        <input name="Password" type="password" class="control" id="Password" size="15">
        <vlvalidator type="required" name="Password" control="Password" errmsg="Password required">
        <vlvalidator name="PassCmp" type="compare" control="Password" comparecontrol="Password2"
          operator="e" validtype="string" errmsg="Both Password fields must be equal">
      </td>
    </tr>
    <tr>
      <td>
        <vllabel validators="Password,PassCmp" errclass="error" for="Password2" cerrclass="controlerror">Confirm Password:</vllabel>
      </td>
      <td>
        <input name="Password2" type="PASSWORD" class="control" id="Password2" size="15">
      </td>
    </tr>
    <tr>
      <td>
        <vllabel errclass="error" validators="NameReq,NameRegExp" for="Name" cerrclass="controlerror">Name:</vllabel>
      </td>
      <td>
        <input name="Name" type="text" class="control" id="Name" size="15">
        <vlvalidator type="required" name="NameReq" control="Name" errmsg="Name required">
        <vlvalidator type="regexp" name="NameRegExp" control="Name" regexp="/^[A-Za-z'\s]*$/" errmsg="Invalid Name">
      </td>
    </tr>
    <tr>
      <td>
        <vllabel errclass="error" validators="EmailReq,Email" for="Email" cerrclass="controlerror">E-mail:</vllabel>
      </td>
      <td>
        <input name="Email" type="TEXT" class="control" id="Email" size="15">
        <vlvalidator type="required" name="EmailReq" control="Email" errmsg="E-mail required">
        <vlvalidator type="format" format="email" name="Email" control="Email" errmsg="Invalid E-mail">
      </td>
    </tr>
    <tr>
      <td colspan=2>
        <input name="Agreement" type="checkbox" id="Agreement" value="1">
        <vllabel errclass="error" validators="Agreement" for="Agreement">I agree with the terms of service</vllabel>
        <vlvalidator type="required" name="Agreement" control="Agreement" errmsg="Agreement checkbox must be selected">
      </td>
    </tr>
    <tr>
      <td colspan="2">
        <input type="submit" class="control" value="Register">
        <input type="reset" class="control" value="Reset">
      </td>
    </tr>
  </table>
</form>
</body>
</html>
<?php VDEnd(); ?>


Action page source (registration_p.php)

Code:

<?php
$sDatabase = 'db_name';
$sHostname = 'localhost';
$sPort     = 3306;
$sUsername = 'user_name';
$sPassword = 'password';
$sTable    = 'Customers';

$rConn = mysql_connect("$sHostname:$sPort", $sUsername, $sPassword) or die(mysql_error());
mysql_select_db($sDatabase);

define('VDAEMON_PARSE', false);
include('vdaemon.php');

function UserIDCheck($sValue, &$oStatus)
{
    global $sTable;
    $sUserID = addslashes($sValue);
   
    $oStatus->bValid = false;
    $oStatus->sErrMsg = "User ID '$sValue' already exist";
   
    $sQuery = "SELECT UserID FROM $sTable WHERE UserID = '$sUserID'";
    if ($rRecordset = mysql_query($sQuery))
    {
        $oStatus->bValid = mysql_num_rows($rRecordset) == 0;
        mysql_free_result($rRecordset);
    }
}

// VDFormat - VDaemon function for adding or removing slashes
$sUserID = VDFormat($_POST['UserID'], true);
$sQuery = "INSERT INTO $sTable SET UserID = '$sUserID'";
mysql_query($sQuery);
?>
<html>
<head>
<title>Registration Form Sample</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="samples.css" rel="stylesheet" type="text/css">
</head>
<body>
<h1>Registration Form Sample</h1>
<p>Your data has been written to the database</p>
<table cellpadding="0" cellspacing="0" border="0">
  <tr>
    <td width="100">User ID:</td>
    <td width="300"><?php echo $_POST['UserID']; ?></td>
  </tr>
  <tr>
    <td>Password:</td>
    <td><?php echo $_POST['Password']; ?></td>
  </tr>
  <tr>
    <td>Name:</td>
    <td><?php echo $_POST['Name']; ?></td>
  </tr>
  <tr>
    <td>E-mail:</td>
    <td><?php echo $_POST['Email']; ?></td>
  </tr>
</table>
</body>
</html>
humajuma



Joined: 30 Apr 2009
Posts: 1

PostPosted: Thu Apr 30, 2009 8:23 am     help please Reply with quote

babbal how do i change the page it redirects to when you click register
reasse



Joined: 06 Aug 2009
Posts: 1

PostPosted: Thu Aug 06, 2009 2:21 am     Reply with quote

hah to create simple registration form you need this


FOR Register.php
Code:
<?php
include ("config.php");
if ("config.php"); {die
print (err("no sql found"));
}
mysql connect ($host,$user,$pass) {die
print (err("sql not found)) else}
select ($db,connection);
?>
<html>
<form name="register" method="post">
<input type="text" name="username" size="30">
<input type="password" name="password" size="30">
<input type="button" class="post" method="insert" name="register" value="Register">
</html>
<?php
if ("register"="name"+"password");
insert into table´users´ values (name,password);
if (username="") {err
print (Please enter Username);
}
if (password="") {err
print (Please enter Password);
}
?>




FOR DB.sql

Code:
structura for table ´user´
create table ´user´

´username´ int(255) default (0)  not null,
´password´ int(30) default (0) not null,
´class´ int(6) default (0) not null;

insert into table ´user´ ,´username´ values (admin);
insert into table ´user´,´password´ values (admin);
insert into table ´user´,´class´ values (6);



FOR CONFIG.php

Code:
<?php
$host="sql_host"
$user="sql_user"
$pass="sql_pass"
$db="sql_db"
mysql_connect($db_host,$db_user,$db_pass);
@mysql_select_db(tonrea_game) or die( "SQL NOT FOUND");
?>
Display posts from previous:   
Post new topic   Reply to topic    HTML Help Forum Index -> ASP All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
HTML Help Archive
Powered by phpBB © 2001, 2005 phpBB Group
HTML Help topic RSS feed 

 
DARFUR
HOSTING / DESIGN
MAKE MONEY

Home
  |   Tutorials   |   Forum   |   Quick List   |   Link Directory   |   About
Copyright ©1997-2002 Idocs and ©2002-2007 HTML Code Tutorial