how to create a members only page

This is a discussion on "how to create a members only page" within the Web Page Design section. This forum, and the thread "how to create a members only page 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 Jan 10th, 2006, 19:43
Up'n'Coming Member
Join Date: Jan 2006
Location: Belfast
Posts: 80
Thanks: 0
Thanked 0 Times in 0 Posts
how to create a members only page

Hi,

Firstly sorry if this is in the wrong forum - was unsure which one to post it into!

Secondly, I am a newbie and learning web design as I go. I would like to create a members only section on a website, and wasn't sure how to go about it.

Can anyone suggest where I can go to either find freeware software which will assist, or an online tutorial? Or any advice to create a members only section!

Thanks
Reply With Quote

  #2 (permalink)  
Old Jan 10th, 2006, 20:04
Junior Member
Join Date: Jan 2006
Location: Leeuwarden, NL
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Exclamation Re: how to create a members only page

I can't create a members-only page for you, but I can give you a UserID - Password (kind of table) code:

HTML: Select all
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>New Page</title>
<script language="javascript">
<!--//
/*This script requires the user to give an ID and password before entering the site*/
function pasuser(form) {
<!--//under: change your own ID
if (form.id.value=="ID") { 
<!--//change your own login-code
if (form.pass.value=="something") {              
<!--//change the page that is secured
location="http://thing.com" 
} else {
alert("Invalid Password")
}
} else {  alert("Invalid UserID")
}
}
//-->
</script>

</head>

<body bgcolor="#000000" text="#00FF00" link="#CCFFCC" vlink="#008000">

<center>
<table bgcolor="#FFFFFF" cellpadding="4" border="1">
<tr><td colspan="2" align="center" height="22" width="282"><p><font size="3" color="#000000">Login
Area</font></p></td></tr>
<tr><td align="center" height="24" width="84"><p><font size="3" color="#000000">User ID:</font></p></td><td align="center" height="24" width="170"><form name="login"><font size="3" color="#000000"><input
name="id" type="text"></font></td></tr>
<tr><td align="center" height="24" width="84"><p><font size="3" color="#000000">Password:</font></p></td><td align="center" height="24" width="170"><font size="3" color="#000000"><input name="pass"
type="password"></font></td></tr>
<tr><td align="center" height="1" width="84"><font size="3"><input type="button" value="Login"
onClick="pasuser(this.form)"></font></td><td align="center" height="1" width="170"><font size="3"><br><input
type="Reset"></form></font></td></tr></table></center> 

</body>

</html>
But: : Secure your source code (google: no right-click and copying of text), otherwise your password-protector does not work (password in source code)!

I hope this will help you.
Reply With Quote
  #3 (permalink)  
Old Jan 10th, 2006, 20:12
benbacardi's Avatar
Highly Reputable Member
Join Date: Feb 2004
Location: United Kingdom
Age: 20
Posts: 611
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to benbacardi Send a message via Skype™ to benbacardi
Re: how to create a members only page

That is possibly the least secure way to secure a site!
SO easily hacked...

You need a server side scripting language such as PHP or ASP, does your host support any of them?
Reply With Quote
  #4 (permalink)  
Old Jan 10th, 2006, 20:47
Up'n'Coming Member
Join Date: Jan 2006
Location: Belfast
Posts: 80
Thanks: 0
Thanked 0 Times in 0 Posts
Re: how to create a members only page

Hi,

Thanks AnneJan for your suggestion - but I will need a fairly secure version - but I do appreciate it!

Benbacardi - yes it does support them (as far as I am aware). What step do I take next?!

Thanks again!
Reply With Quote
  #5 (permalink)  
Old Jan 10th, 2006, 21:09
benbacardi's Avatar
Highly Reputable Member
Join Date: Feb 2004
Location: United Kingdom
Age: 20
Posts: 611
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to benbacardi Send a message via Skype™ to benbacardi
Re: how to create a members only page

well, which does your host support? PHP, or ASP? they will most likely support one in full, and if its a PHP host i cud also support a watered-down version of ASP.

Once you know which language, go head over to that forum, read articles etc!
Reply With Quote
  #6 (permalink)  
Old Jan 10th, 2006, 21:13
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: how to create a members only page

Yes there are some really terrible 'secure' sites out there from web design cowboys.

Credit card info sent to emails among others :s
Reply With Quote
  #7 (permalink)  
Old Jan 10th, 2006, 22:08
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: how to create a members only page

Take a look at an article I wrote for another member that was after the same sort of thing here.
Reply With Quote
  #8 (permalink)  
Old Jan 11th, 2006, 04:54
Junior Member
Join Date: Jan 2006
Age: 25
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
Re: how to create a members only page

Hey tim i looked over the article, but how are you storing the information? It looks like they have to login after each visit.

Also, you dont need to use MySQL for doing this really. If you set up a config file with an array of users and passes, it is usually most efficient for SMALL scale admin areas. You can even go as far as to drop them into an associative array with user levels. Then, the great thing is, if in the future you need to upgrade to database control, you can just drop your result into and array and nothing in your script has to change.

Also, the guy that mentioned the javascript is totally a bad idea. NEVER use javascript for trying to create secure login scripts. It doesnt work buddy. You need to use PHP, dont get involved with asp, its "A Sorry Program" developed my ms. PHP is free and almost ALL standard hosts offer it free with hosting. I think something like 60% of the internet is made up of LAMP (Linux Apache MySQL and PHP) all free programs that anyone can install on almost all platforms, well at least the AMP part.

just my 2 cents.
Reply With Quote
  #9 (permalink)  
Old Jan 11th, 2006, 10:12
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: how to create a members only page

Hi rproctor, where am I storing the info? As I mentioned in the tutorial, you'd create a session to store the login details after the user has been authenticated - this is relatively easy but outside of the scope of the article. If you like, I can write an article about sessions that would explain everything. Let me know and I'll get to work.
Reply With Quote
  #10 (permalink)  
Old Jan 11th, 2006, 13:27
Junior Member
Join Date: Jan 2006
Age: 25
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
Re: how to create a members only page

I know what sessions are, how to use them, and all that good stuff. I was just curious because I didnt really read the article, I just skimmed over the code and I didnt see any code that stored the login information. Regardless though, sessions are probably the best way to store information
Reply With Quote
  #11 (permalink)  
Old Jan 11th, 2006, 15:47
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: how to create a members only page

Quote:
You need to use PHP, dont get involved with asp, its "A Sorry Program" developed my ms.
Ah, the good old php/asp debate
Reply With Quote
  #12 (permalink)  
Old Jan 11th, 2006, 16:18
Junior Member
Join Date: Jan 2006
Age: 25
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
Re: how to create a members only page

I just dont get why ASP is so big. If you look at asp coming from a language like java, php, etc it doesnt make sense, well to me at least. It took me a while to grasp the structure of it, and as little as I know about asp the one thing I do know is that I dont really like it. PHP has so much better support, programs, etc. Even most windows server run php, or I think they do, compared to windows servers running asp. I dont know, asp is probably very powerful, and can do a lot of the same things if not more than php, but the time and resources it takes to develop in asp are a lot larger.
Reply With Quote
  #13 (permalink)  
Old Jan 13th, 2006, 08:16
Junior Member
Join Date: Dec 2005
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
Re: how to create a members only page

How about .htaccess?
I just made a members area for my rugby team, doing something very similar to what Tim356's article says to do. Mine is a little different though. When someone registers, all the information is put into a table called "wannabe", when they register, an email is sent to me telling me someone wants to be a member. I then go to the page that will call this info from the table. I look at it and if they are qualified to be a member, I submit this info from the wannabe table and it is inserted into the "members" table. Then an email is sent to the person telling them that they are now a member. Then the info in the wannabe table is deleted.
Basically the difference between mine and Tim's is that Tim's simple registration is just that, the basics, but then anyone could register and become a member. With mine, an admin has to accept the application to become a member.
When a member signs in, I set a session cookie. I then put a script at the top of each page, if the cookie doesn't say they are logged in, they get redirected to the login page.
Reply With Quote
  #14 (permalink)  
Old Jan 13th, 2006, 13:30
Junior Member
Join Date: Jan 2006
Age: 25
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
Re: how to create a members only page

You could just make a field in the database called "active" and set it to default to 0, then if they are qualified set it to 1. Thats how I do most of my admin controls.
Reply With Quote
  #15 (permalink)  
Old Jan 13th, 2006, 20:59
Junior Member
Join Date: Dec 2005
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
Re: how to create a members only page

Good idea. Maybe in future members areas I will do something similar. For now, that would take a lot of rewriting to do, more than I'm willing.
Reply With Quote
  #16 (permalink)  
Old Jan 13th, 2006, 22:51
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: how to create a members only page

Quote:
Originally Posted by rproctor
. You need to use PHP, dont get involved with asp, its "A Sorry Program" developed my ms. PHP is free and almost ALL standard hosts offer it free with hosting.
your one of these people who have no idea what their on about. have u ever used asp or .net?

and back on topic, search for a post somwhere where me and tim added both asp and php login tutorials...should help you out...
Reply With Quote
  #17 (permalink)  
Old Jan 13th, 2006, 23:53
Junior Member
Join Date: Jan 2006
Age: 25
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
Re: how to create a members only page

I never said it wasnt powerfull, or that it doesnt have its perks, but unless you need asp for a specific task, then what is really the point of using? For one its not free, and the scripting structure is complicated to anyone who isnt familiar with programming. A newbie who has no programming skills can pick up php, plus php is super powerful. And I know what I am on about, I have been about it for many years lol.

All I know about asp is that it costs $$$ and I could use PHP to do the same things for free. If php cant handle it, then Im sure that mixing in some ajax will take care of whatever it is.

True I have never used asp, only fiddled with it a couple of times when I needed to fix something on my buddies website. Other than that, no idea how it works. But for this guy who posted this topic, im 99% positive he should go with php!
Reply With Quote
  #18 (permalink)  
Old Jan 13th, 2006, 23:59
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: how to create a members only page

well, i use BOTH php and asp - i actually can give an informed answer here.

yeah, classic asp is useless, its in comparason with php3, but .net is almost as good as php. In my opinen, php is in some ways better then asp, but people who have never used it cant really make the point...

i started using asp before php, and found php confusing at first...its what you know.

To give a proper answer, you should really include all the answers and let sombody make their own mind up. Like saying tables or css....

asp is a good language, and it depends what your doing. asp costs $$$ - yea your right it does. but what if you have a large letwork running windows anyway...

Lets have good answers that look more like debates with hints and not flat out misguided opinens dressed up as facts...
Reply With Quote
  #19 (permalink)  
Old Jan 14th, 2006, 00:35
Junior Member
Join Date: Jan 2006
Age: 25
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
Re: how to create a members only page

Hey man I dont want to start a flame. Yes you are right, I cant give an "educated" answer about what is better, I can only tell you that for the past 4 years I have worked in the industry, before that I spent about 5 years studying, researching, building, and testing web sites. In all my time, and all my experience, I have not once met a team member, buddy, or teacher who actually liked asp, used it on a regular basis, or recomended it (over php).

Yes you are correct, if you are running a windows server than yes asp can be usefull. Yes asp will most likely run better because yes it is a microsoft product. But like I said, Linux Apache MySQL & PHP make up the largest lump sum on the internet. I can only imagine why? Not to mention, running a windows server is way more $$$.

Im not trying to give "misguided opinens dressed up as facts" im simply trying to help portray what the best solution to the problem is. If I voice my opinions thats cool with me. I never said asp was a sorry programmer, I said program. In fact, if you program in asp your most likely a pretty decent programmer. So props to you for learning how to split your knowledge. But personally, I wouldnt want to invest the time nor the effort in learning a soon to be depricated language like asp.

Quite simply, just stick with php, it will probably do everything you need it to do.
Reply With Quote
  #20 (permalink)  
Old Jan 14th, 2006, 00:45
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: how to create a members only page

hmm..

im looking at the screen like this - and after this, we really will drop this!

asp is depreciated...asp is old and rubbish. its no longer being developed....its .net!
this php is better then asp is true! however, against .net, your having a good run for your money..
you work on what you need....if you need to pull data from excel into a web based page, i really dont think many php programmers would like that task...wheras in asp, its like connecting to a database...

The php / asp(.net) debate can go on forever.... but lets not just drop it as its a MS product. It too can be very powerfull.
Reply With Quote
Reply

Tags
create, members, page

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
Which software to use to create a web page? learner6 Starting Out 8 Mar 31st, 2008 17:56
How to create a centered page with layers. sgbrix Web Page Design 7 Mar 11th, 2008 15:36
Advice on creating a members only page Oak PHP Forum 3 Feb 13th, 2008 22:13
how to create a comment page? kool77 Web Page Design 5 Jun 24th, 2007 08:26
How do I create a shadow around my page? WebMan76 Starting Out 4 Apr 17th, 2007 01:21


All times are GMT. The time now is 08:53.


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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43