School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

Welcome to Dream.In.Code
Become an Expert!

Join 307,122 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,989 people online right now. Registration is fast and FREE... Join Now!




Code to require login

 

Code to require login

ammie04

28 Oct, 2009 - 10:06 AM
Post #1

New D.I.C Head
*

Joined: 10 May, 2009
Posts: 7

I have some experience with html, css, and js but what code do I need to require a login to some of my pages? I have a general population page and then back pages that will require a login. Can someone help me out with code or point me in the right direction? Thanks - Ammie smile.gif

User is offlineProfile CardPM
+Quote Post


markhazlett9

RE: Code To Require Login

28 Oct, 2009 - 10:09 AM
Post #2

Coding is a lifestyle
Group Icon

Joined: 12 Jul, 2008
Posts: 1,464



Thanked: 48 times
Dream Kudos: 25
My Contributions
You will need to know some PHP in order to accomplish this. There are a ton of books out there to help you with this and then if you have any issues there is an entire PHP forum here to help you out.

Cheers
User is online!Profile CardPM
+Quote Post

ಠ_ಠ

RE: Code To Require Login

28 Oct, 2009 - 01:27 PM
Post #3

D.I.C Head
**

Joined: 26 Sep, 2008
Posts: 104


My Contributions
You will need a good database to.
I would suggest testing scripts on your local computer.
Its a pain to keep uploading them to a server.

I would suggest wamp.
http://www.wampserver.com/en/

PHP and Mysql cant run with just a browser like HTML,CSS and JS.




PHP tutorial:
http://www.w3schools.com/PHP/DEfaULT.asP

Mysql tutorial:
http://www.tizag.com/mysqlTutorial/

Simple login script tut:
http://www.youtube.com/watch?v=Txj4mj5yom0...feature=channel
User is offlineProfile CardPM
+Quote Post

Daegan

RE: Code To Require Login

28 Oct, 2009 - 07:45 PM
Post #4

D.I.C Head
Group Icon

Joined: 17 Mar, 2009
Posts: 64



Thanked: 3 times
Dream Kudos: 25
My Contributions
Alternately, if you have ASP.NET as a possible source, and don't want to use PHP.. it'll handle login and user creation pretty "hands free" style.

You simply use <asp:login runat="server" id="ID"></asp:login> and it'll generate the login form and handle the events (assuming it was all setup correctly in the web.config)
User is offlineProfile CardPM
+Quote Post

no2pencil

RE: Code To Require Login

28 Oct, 2009 - 07:47 PM
Post #5

i R L33t Skiddie, k?
Group Icon

Joined: 10 May, 2007
Posts: 13,494



Thanked: 303 times
Dream Kudos: 2875
Expert In: Goofing Off

My Contributions
QUOTE(Daegan @ 28 Oct, 2009 - 09:45 PM) *

Alternately, if you have ASP.NET as a possible source, and don't want to use PHP


Right. A server side language will be required. Not any one particular language, but something on the server, with access to a database is pretty standard.
User is online!Profile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic

Time is now: 11/21/09 01:55PM

Live Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month