some type of member login/register system

This is a discussion on "some type of member login/register system" within the Web Page Design section. This forum, and the thread "some type of member login/register system are both part of the Design Your Website category.



Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Dec 10th, 2005, 01:53
New Member
Join Date: Dec 2005
Age: 20
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
some type of member login/register system

im sure you probly get tons of questions like this and i dont really know anything about it. this might even be in the wrong section. sorry.

im making this website for one of my friends band and they like to edit whats on it with stuff like new gig dates and news. they dont know anything about websites and im afraid theyd mess up the site if i give them the password to write new stuff.

so i was wondering if there was like a log in system were they could make a new blog or section on the site when they wanted and they could edit it. i cant spend any money and if its to complicated then never mind they can just email it and ill change it but it would be cool i think. any help or suggestions. but if its not free then never mind. i found some sites from google and they deal with databases. i know nothing about them but i found a site that offers free ones or something. i even downloaded this hole login system thing but im clueless. any help.
Reply With Quote

  #2 (permalink)  
Old Dec 10th, 2005, 02:26
Most Reputable Member
Join Date: Aug 2005
Location: North Wales, United Kingdom
Age: 21
Posts: 1,093
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to sypher
Re: some type of member login/register system

What u need is PHP or ASP depending what you host accepts.
Reply With Quote
  #3 (permalink)  
Old Dec 10th, 2005, 19:01
New Member
Join Date: Dec 2005
Age: 20
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Re: some type of member login/register system

Hey, thanks umm my host is brinkster and i use the free educational package and it says it supports ASP 3.0 and ASP.NET. so what can i start to do. maybe there is another post on this forum with all the information. not sure. ill look around but any help would be great.
Reply With Quote
  #4 (permalink)  
Old Dec 10th, 2005, 21:05
Highly Reputable Member
Join Date: May 2005
Location: U.K
Age: 21
Posts: 739
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to benbramz
Re: some type of member login/register system

what your wanting to do is fairly simple...

do u have any knowledge of asp? if so we can skip a step..
Reply With Quote
  #5 (permalink)  
Old Dec 10th, 2005, 23:30
Anonymous User
Guest
Posts: n/a
Re: some type of member login/register system

A web "content management system" would make it easy for them to update the content in their site.

Alternately, if you have no money (and don't mind below average site design), you may consider one of the "website in 3 easy steps" solutions provided by NetSol.com, GoDaddy.com, etc.
Reply With Quote
  #6 (permalink)  
Old Dec 10th, 2005, 23:42
New Member
Join Date: Dec 2005
Age: 20
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Re: some type of member login/register system

sorry i dont know anything about asp
Reply With Quote
  #7 (permalink)  
Old Dec 10th, 2005, 23:43
Most Reputable Member
Join Date: Aug 2005
Location: North Wales, United Kingdom
Age: 21
Posts: 1,093
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to sypher
Re: some type of member login/register system

Then you can start learning At the top of this site is an Articles button. Read some of the ASP articles on there and www.tutorialized.com
Reply With Quote
  #8 (permalink)  
Old Dec 11th, 2005, 01:09
Highly Reputable Member
Join Date: May 2005
Location: U.K
Age: 21
Posts: 739
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to benbramz
Re: some type of member login/register system

maybe it would be an idea to make an article, build your own blogg....webforumz style...

If this is gona help people, ill do one. in both php and asp perhaps?

let me know some thoughts on this....i could have one up for monday morning if its going to be a big help...
Reply With Quote
  #9 (permalink)  
Old Dec 11th, 2005, 17:13
New Member
Join Date: Dec 2005
Age: 20
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Re: some type of member login/register system

yes that would be helpful. umm asp becuase thats what i can use for free but php would be helpful to others to.
Reply With Quote
  #10 (permalink)  
Old Dec 11th, 2005, 22:11
Highly Reputable Member
Join Date: May 2005
Location: U.K
Age: 21
Posts: 739
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to benbramz
Re: some type of member login/register system

ill throw somthing together...
Reply With Quote
  #11 (permalink)  
Old Dec 11th, 2005, 23:49
Most Reputable Member
Join Date: Aug 2005
Location: North Wales, United Kingdom
Age: 21
Posts: 1,093
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to sypher
Re: some type of member login/register system

Good
Reply With Quote
  #12 (permalink)  
Old Dec 12th, 2005, 20:20
New Member
Join Date: Dec 2005
Age: 37
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Re: some type of member login/register system

I think Fantistico has a script that may work for you, your web host may offer it.
Reply With Quote
  #13 (permalink)  
Old Dec 15th, 2005, 22:08
New Member
Join Date: Dec 2005
Age: 20
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Re: some type of member login/register system

so hows it coming along? or is it already done.
Reply With Quote
  #14 (permalink)  
Old Dec 16th, 2005, 00:12
Highly Reputable Member
Join Date: May 2005
Location: U.K
Age: 21
Posts: 739
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to benbramz
Re: some type of member login/register system

not even started it...not enuf hours in the day...
Reply With Quote
  #15 (permalink)  
Old Dec 16th, 2005, 01:36
New Member
Join Date: Dec 2005
Age: 20
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Re: some type of member login/register system

oh lol ok. ive been trying to use the b2evolution thing i found with google.. but its not working. so ill wait for you. but no hurry
Reply With Quote
  #16 (permalink)  
Old Dec 27th, 2005, 17:23
Highly Reputable Member
Join Date: May 2005
Location: U.K
Age: 21
Posts: 739
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to benbramz
Re: some type of member login/register system

just so you know, ive been making some nice progress...

Reply With Quote
  #17 (permalink)  
Old Dec 28th, 2005, 06:45
Tim356's Avatar
Reputable Member
Join Date: Nov 2003
Location: Australia
Age: 25
Posts: 331
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Tim356
Re: some type of member login/register system

I just sat down and wrote an article, then when I tried to add it to the article section kept getting a "Suspiscious Content" error.

So here it is, a php/mysql member system:


Creating a Simple Login System with PHP and MySQL

Most interactive websites nowadays would require a user to log in into the website’s member system in order to authenticate the user and display customised views for them.

A basic login system usually consists of 2 parts:

1. A module that allows a user to register their username and password.
2. A module that authenticates the user when they log in.

A simple system is easily created with PHP and MySQL.

Module 1 – Registration

Module 1 is typically implemented using a simple HTML form that contains 4 fields and 2 buttons:

1. A username field
2. A password field
3. A password reminder
4. An email address field
5. A Submit button
6. A Reset button

For this example, the form is included in a file named register.html.

HTML: Select all
<form name="register" method="post" action="register.php">
<input name="register_name" type="text" value="username" size="20"/><br>
<input name="register_password" type="text" value="password" size="20"/><br>
<input name="password_reminder" type="text" value="password reminder" size="20"/><br>
<input name="register_email" type="text" value="email" size="50"/><br>
<input type="submit" name="submit" value="submit"/>
<input type="reset" name="reset" value="reset"/>
</form>
When the user has filled in all the fields, the register.php page is called when the user clicks the Submit button.

The following code registers the user in the database. It connects to the MySQL database and inserts a record into the table used to store the registration info.

PHP: Select all

<?php
$register_name 
$_POST['register_name'];
$register_password $_POST['register_password'];
$register_email $_POST['register_email'];
$password_reminder $_POST['password_reminder'];

@
mysql_connect("localhost""database_username""database_password") or die("Cannot connect to 

database."
);
@
mysql_select_db("db_name") or die("Cannot select database");
$insert mysql_query("insert into users values ('NULL','".addslashes($register_name)."', 
'"
.sha1($register_password)."','".$password_reminder."','".$register_email."')")
or die(
"Could not insert data because ".mysql_error());
?>
This example assumes that the MySQL table that is used to store the registration record is named users and contains 5 fields – an id field(auto incremented), username, password, password reminder and email fields. The values of the $_POST['register_name'], $_POST['register_password'], $_POST['register_email'] and $_POST['password_reminder'] variables are passed in from the form in register.html via the post method. It also stores the password using secure hash algoryth (sha1), a very secure encryption method.

Module 2 – Authentication

FOr the user to then login to the website they will have to provide their username and password for the system to authenticate them.

This is done through a simple HTML form. This HTML form contains 2 fields and 2 buttons:

1. A username field
2. A password field
3. A Submit button
4. A Reset button

For this exmaple, the file will be called authenticate.html. When the user has filled in all the fields, the authenticate.php page is called when the user clicks on the Submit button.

HTML: Select all
<form name="authenticate" method="post" action="authenticate.php">
<input name="username" type="text" value="username" size="20"/><br>
<input name="password" type="text" value="password" size="20"/><br>
<input type="submit" name="submit" value="submit"/>
<input type="reset" name="reset" value="reset"/>
</form>
The following code sits in a file called authenticate.php (for this example) and processes the login. It connects to the MySQL database and queries the table used to store the registration details.

PHP: Select all

<?php
@mysql_connect("localhost""database_username""database_password") or die("Cannot connect to 

database."
);
@
mysql_select_db("db_name") or die("Cannot select database");

$match "select id from users where username = '".$_POST['username']."' 
and password = '"
.sha1($_POST['password'])."';"

$qry mysql_query($match
or die (
"Could not match data because ".mysql_error()); 
$num_rows mysql_num_rows($qry); 

if (
$num_rows <= 0) { 
echo 
"Incorrect Username/Password"
} else { 
//Let user do what they want, or set cookie, session etc.

?>
As in Module 1, this code assumes that the MySQL table that is used to store the registration data is named users and contains 5 fields – an id field (auto incrementing), username, password, password reminder and email fields. The values of the $_POST['username'] and $_POST['password'] variables are passed in from the form in authenticate.html using the post method.

And that's it, a simple user registration/login system that can be used for any site running PHP.

It can be further improved to include a profile editor for the user to change their details and can also be setup to use sessions to store details across pages.

You should also include some sort of validation for the html forms, to ensure users enter correct data and no security holes are opened up.

Last edited by Tim356; Jan 1st, 2006 at 05:48.
Reply With Quote
  #18 (permalink)  
Old Dec 28th, 2005, 15:36
Most Reputable Member
Join Date: Aug 2005
Location: North Wales, United Kingdom
Age: 21
Posts: 1,093
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to sypher
Re: some type of member login/register system

nice one tim
Reply With Quote
  #19 (permalink)  
Old Dec 28th, 2005, 23:18
Highly Reputable Member
Join Date: May 2005
Location: U.K
Age: 21
Posts: 739
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to benbramz
Re: some type of member login/register system

sweeet.

cept he needs asp. hehehe
Reply With Quote
  #20 (permalink)  
Old Dec 29th, 2005, 03:05
Highly Reputable Member
Join Date: May 2005
Location: U.K
Age: 21
Posts: 739
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to benbramz
Re: some type of member login/register system

heres the asp version:

again, we have the form, with the 4 fields....

HTML: Select all
<form name="form1" method="post" action="add_user.asp">
    <input name="username" type="text" id="username" value="username">
    <input name="password" type="password" id="password" value="password">
    <input name="reminder" type="text" id="reminder" value="reminder">
    <input name="email" type="text" id="email" value="email">
    <input type="submit" name="Submit" value="Submit">
    <input type="reset" name="Reset" value="Reset">
</form>
simple.
Next up we have add_user.asp which will add the users details into the database. this example is set for using access as the database type, so beware! as the db can just be downloaded. move to a host that offers sql db Lucid!
anyway, here.
Code: Select all
dim conn, add
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open("DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("database.mdb"))
Set add = Server.CreateObject("ADODB.Recordset")
add.Open "SELECT * FROM users", conn, 2, 2 
add.AddNew 
add("username") = request.form("username")
add("password") = request.form("password")
add("reminder") = request.form("reminder")
add("email") = request.form("email")
add.Update
add.close
set conn = nothing
response.write("you have just made an account!")
this example is assuming you have a database, named database.mdb - with a table called users, with the columns username, password, reminder and email. you can change them here:-
add("THIS-IS-WHERE-YOU-WOULD-CHANGE")
next, you need a form to check the users details.
HTML: Select all
<form name="login" method="post" action="check_user.asp">
  <input name="textfield" type="text" value="username">
  <input name="textfield" type="password" value="password">
  <input name="login" type="submit" id="login" value="login">
</form>
ta daaa!
now, for user checking
Code: Select all
dim conn, login
Set conn = Server.CreateObject("ADODB.connion")
conn.Open("DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("database.mdb"))
Set login = Server.CreateObject("ADODB.Recordset")
login.Open "SELECT * FROM users where username='" & request.form("username") & "' and password='"& request.form("password") & "'" , conn, 3, 1, 1 
if login.recordcount <> 1 then
response.write "wrong username / password!"
else
session("username")= login("username")
session("userID")= login("ID")
end if
login.close
set conn = nothing

response.Redirect("member_page_perhaps")
thats pretty much the end of a basic tutorial on asp login...

if you wanted to have a member page, and only allow member to see it, you could add this, to your page.
Code: Select all
 <%
 if session("username") > "" then
 %>
 <!-- add you html content here.....-->
 <%
 else
 response.write "you have to be a member"
 end if
 %>
if you wanted to display the users username somewhere, just place <%=session("username")%>

remeber, that using an access db to store account info is not a good idea. as it can be downloaded. one step would be to encrypt the password, but that only adds a small amount of protection. using a sql database is the most secure way...
Reply With Quote
Reply

Tags
type, member, loginregister, system

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
News System login problem Andrew1986 Classic ASP 3 Dec 20th, 2007 23:58
login system class alexgeek PHP Forum 1 Aug 28th, 2007 03:09
Login/register alexgeek PHP Forum 63 Jul 31st, 2007 11:42
PHP Login Register help atlaskid PHP Forum 6 Nov 10th, 2006 21:34
PHP login system robertboyle PHP Forum 1 Jun 26th, 2006 14:38


All times are GMT. The time now is 23:22.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved