Go Back   Cloud Computing > Support > PHP Forum
 

Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 10-17-11, 21:33
BOD Member
 
Join Date: Aug 2011
Posts: 76
Default PHP: Create a log in form/User database

Hello,

I am creatting a website and I would like to have a login for exclusive content, such as downloads or certain pages.

I already know how to create a form, but I'm not sure how to make the form validate the user and where I should have a datbase with all the users/passwords.

My current hoster has MyPHP and so on. Thanks in advance.
Reply With Quote
  #2 (permalink)  
Old 11-07-11, 05:11
BOD Member
 
Join Date: Oct 2011
Posts: 39
Default

You are going to create log in system by using PHP code on your pages, and a MySQL database to store store users information, right? If so, then follow the below URL you'll find simple steps for your concern issue.

Reply With Quote
  #3 (permalink)  
Old 12-01-11, 11:10
BOD Member
 
Join Date: Dec 2011
Posts: 16
Default create login form in php

hi,
Please follow these steps
1. Create a login form in html
2. give it an action say xyz.php
3. in xyz.php file check if the form is submitted using $_POST
4. Validate the values with the database by following query
select * from users where username = $_POST['user'] and password = $_POST['pass']
if data is returned from the above query.
then login success else false.

Thanks
CoreIT developers
Reply With Quote
Reply


Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump


All times are GMT -6. The time now is 01:22.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
Copyright © 1999-2012, BODHost Ltd. All rights reserved.