How to create a Member System. Our member system will include user login, registration, email activation, and even a forgot password pages. This video is the forgot password portion of the videos. Source Package: Available Shortly Website: www.nickfrosty.com Twitter: www.twitter.com
Posts Tagged ‘Logout’
PHP Tutorial: Make a Member System // User Login (1/3)
March 14th, 2011
phpmoz How to create a Member System. Our member system will include user login, registration, email activation, and even a forgot password pages. This video is the login and logout portion of the videos. Source Package: www.nickfrosty.com Website: www.nickfrosty.com Twitter: www.twitter.com
PHP Tutorial: Make a Member System // Email Activation (1/2)
March 11th, 2011
phpmoz How to create a Member System. Our member system will include user login, registration, email activation, and even a forgot password pages. This video is the email activation portion of the videos. Source Package: Available Shortly Website: www.nickfrosty.com Twitter: www.twitter.com
PHP Tutorial : Registration / Login System (Part 1)
April 26th, 2010
phpmoz This is a registration and login system tutorial in PHP / HTML. Post comments or questions, please subscribe.
PHP Login/Register Tutorial – Part 1
February 26th, 2010
phpmoz PHP Login/Register Tutorial – Part 1, enjoy! COMMENT RATE SUBSCRIBE!
PHP Login/Register Tutorial – Part 2
February 24th, 2010
phpmoz PHP Login/Register Tutorial – Part 2, enjoy! COMMENT RATE SUBSCRIBE!
PHP Lesson 10: MySQL User Login – Part 1
September 8th, 2009
phpmoz Professional Database Development www.comentum.com code @ www.gorilla3d.com UPDATE: ——————————- How do you create the database for this tutorial? Php 09: phpMyAdmin www.youtube.com Sorry for the confusion
Php Syntax Error In Logout Script!?
August 25th, 2009
phpmoz I have 4 scripts that make up a basic login system with registration. Everything works except logout.php. It gets this error:
Parse error: syntax error, unexpected T_VARIABLE in /home/a9161210/public_html/logout.php on line 1
LOGOUT.PHP:
Login.php:
<?php
mysql_connect("mysql3.000webhost.com", "a9161210_login", "dualpower1") or die(mysql_error());
mysql_select_db("a9161210_login") or die(mysql_error());
//Checks if there is a login cookie
if(isset($_COOKIE['ID_my_site']))
//if there is, it logs you in and directes you to the members page
{
$username = $_COOKIE['ID_my_site'];
$pass = $_COOKIE['Key_my_site'];
$check = mysql_query("SELECT * FROM users WHERE username = '$username'")or die(mysql_error());
while($info = mysql_fetch_array( $check ))
{
if ($pass != $info['password'])
{
}
else
{
header("Location: members.php");
}
}
}
//if the login form is submitted
if (isset($_POST['submit'])) {
// makes sure they filled it in
if(!$_POST['username'] | !$_POST['pass']) {
die('You did not fill in a required field.');
}
// checks it against the database
if (!get_magic_quotes_gpc()) {
$_POST['email'] = addslashes($_POST['email']);
}
$check = mysql_query("SELECT * FROM users WHERE username = '".$_POST['username']."'")or die(mysql_error());
//Gives error if user dosen't exist
$check2 = mysql_num_rows($check);
if ($check2 == 0) {
die('An error occured please try again, or Click Here to Register ‘);
}
while($info = mysql_fetch_array( $check ))
{
$_POST['pass'] = stripslashes($_POST['pass']);
$info['password'] = stripslashes($info['password']);
$_POST['pass'] = md5($_POST['pass']);
//gives error if the password is wrong
if ($_POST['pass'] != $info['password']) {
die(‘An error occured please try again, or Click Here to Register ‘);
}
else
{
// if login is ok then we add a cookie
$_POST['username'] = stripslashes($_POST['username']);
$hour = time() + 3600;
setcookie(ID_my_site, $_POST['username'], $hour);
setcookie(Key_my_site, $_POST['pass'], $hour);
//then redirect them to the members area
header(“Location: members.php”);
}
}
}
else
{
// if they are not logged in
?>
<form action="” method=”post”>
Login |
|
| Username: | |
| Password: | |
Register.php:
Registered
Thank you, you have registered – you may now login.
<form action="” method=”post”>
| Username: | |
| Password: | |
| Confirm Password: | |
members.php:
<?php
mysql

Posted in
Tags:

