| | |
PHP Login Help?
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: May 2008
Posts: 67
Reputation:
Solved Threads: 3
•
•
•
•
I have started a new website and I know basic HTML but I am clueless with PHP. I need to set up a login system where members can save their info on the site. I need to learn PHP, cookies, and a login system. Thanks.

http://php.about.com/od/finishedphp1...login_code.htm
they have all step by step procedures for creating a login system , setting cookies etc.
Kavitha
I Love My Indonesia.
I Love My Indonesia.
I have just completed a login system for a php site and although it is not open source I will tell you how it works. So for beginners, you will need to know the following:
Making sessions
http://www.tizag.com/phpT/phpsessions.php
http://au2.php.net/session_start
Making HTML Forms
The isset($_POST['variable']) command
MySQL querys
PHP Variables
And a few other small things. So to begin with, make a html page with a html login form then when it all looks perfect, change the extension to php and use the echo ""; command to show the page. Be sure not to use any double quotation marks ( " ) in your html codes otherwise you will come across problems.
After you have a html form, you have a php code at the beginning that detects if the form has been submitted. If the if function detects the form has been submited, then the script will attempt to connect to the MySQL database to check if the form details are valid. Then if the details are valid, a session is created. When the session is created, other parts of the website can see if the user is logged in. You then set the pages so that if there is no session in place, then the parts of pages (or even whole pages) will not load up.
Also if you are new to php then you should read some books and online tutorials about php before using it otherwise you may find yourself very lost. This is a brief post but I can explain more if you have any trouble understanding.
Making sessions
http://www.tizag.com/phpT/phpsessions.php
http://au2.php.net/session_start
Making HTML Forms
The isset($_POST['variable']) command
MySQL querys
PHP Variables
And a few other small things. So to begin with, make a html page with a html login form then when it all looks perfect, change the extension to php and use the echo ""; command to show the page. Be sure not to use any double quotation marks ( " ) in your html codes otherwise you will come across problems.
After you have a html form, you have a php code at the beginning that detects if the form has been submitted. If the if function detects the form has been submited, then the script will attempt to connect to the MySQL database to check if the form details are valid. Then if the details are valid, a session is created. When the session is created, other parts of the website can see if the user is logged in. You then set the pages so that if there is no session in place, then the parts of pages (or even whole pages) will not load up.
Also if you are new to php then you should read some books and online tutorials about php before using it otherwise you may find yourself very lost. This is a brief post but I can explain more if you have any trouble understanding.
Try not to bump 10 year old threads as it can be really annoying.
http://syntax.cwarn23.net/
My favourite PC. - Oopy Doopy Do 2U2!
http://syntax.cwarn23.net/
Smilies: ^_* +_+ v_v -_- *~*` My favourite PC. - Oopy Doopy Do 2U2!
![]() |
Similar Threads
- .htaccess mod_rewrite to php login (PHP)
- login scripts (PHP)
- Php With Sessions Aah (PHP)
- Parse Error in PHP (PHP)
- Help with Login Box (PHP)
- php login form (PHP)
- Php-htaccess-cgi (PHP)
- Best Web Hosting 4 PHP (Web Hosting Deals)
- PHP Login (PHP)
Other Threads in the PHP Forum
- Previous Thread: Deleting session cookie
- Next Thread: if(category.equals("sercategory"))
Views: 589 | Replies: 3
| Thread Tools | Search this Thread |
Tag cloud for PHP
.htaccess access ajax apache api array beginner binary broken cakephp checkbox class cms code cron curl customizableitems database date directory display download dynamic echo email error file files folder form format forms forum function functions google headmethod href htaccess html image include insert integration ip java javascript joomla jquery limit link login loop mail malfunctioning menu methods mlm mod_rewrite multiple mysql oop parse paypal pdf php problem query radio random recursion regex remote script search select server sessions sms soap source space speed sql structure syntax system table tutorial update updates upload url validation validator variable video web xml youtube






