hi can someone tell me how to add a change of password feature to this script
http://tutorialzine.com/2009/10/cool-login-system-php-jquery/
looked everywhere.
hi can someone tell me how to add a change of password feature to this script
http://tutorialzine.com/2009/10/cool-login-system-php-jquery/
looked everywhere.
Can you specify as to how you’d like it to be changed?
That tutorial is terribly outdated, both the database handling and the password hashing was outdated 10 years ago…
It always amazes me how people who build websites either don’t maintain them or they forget about them, thus leaving outdated material on the web. It’s not bad if the material isn’t technical, but for technical stuff it can be outdated in a year (or even less in some cases).
well at the moment it sends you a password to your email once you register. i would like it so you can choose your own password when registering so adding a password field to the register form or once logged in have a link that allows you to change your password. if you can.
thank you
I sent an message on their contact form to remove or update the tutorial. The rest of you, please take a second and do the same. It’s time to get these old tutorials removed or updated.
managed to add the password field to the register page like this
Username:
Email:
Password:
but how do i get what people type into that password field into the database.
You should not even be messing with that code. You need to use PDO or Mysqli. No one should rightfully help you with this script. You have already been informed this is obsolete code. Find a tutorial on a PDO login script.
I don’t like tooting my own horn, but look at my signature for a updated registration/login tutorial.
I even have a mysqli tutorial of the same thing, though I think PDO is nicer to work with.
Or Look Kevin Rubio’s or JimL’s signatures (I think), but I there is a tutorial on this in the tuturial section of this website.
My sig link is not a tutorial, just a download for a quick working basic PDO DB startup to get people off old Mysql. It does not include the login functionality since it is part of an application framework I sell.
to be honest it is the black sliding feature that i like. when you click on login or register the black thing slides down. but i do not know how to create that feature.
Simple enough. Here is the code for just that feature.
http://web-kreation.com/tutorials/nice-clean-sliding-login-panel-built-with-jquery/
so if it is not the design that is the problem then what was the problem with the script. was it the way the database is laid out and thank you.
It uses deprecated (Obsolete) Mysql code.
when you click download the age does not find the zip file
Sorry man, not my site. That stuff was posted in 2009. You will have to figure it out from the download you were able to get. It is the java script you want.
ok i made some progress but it still does not work it does not register or login. can anyone tell me why.once logged in i would like it to take you to a page called area.php
[php]<?php
/**************************************************************************************
//Include the database connection file
include “config.php”;
//Check to see if the submit button has been clicked to process data
if(isset($_POST[“submitted”]) && $_POST[“submitted”] == “yes”)
{
//Variables Assignment
$username = trim(strip_tags($_POST[‘username’]));
$user_password = trim(strip_tags($_POST[‘passwd’]));
$encrypted_md5_password = md5($user_password);
$validate_user_information = mysql_query("select * from `friendship_system_users_table` where `username` = '".mysql_real_escape_string($username)."' and `password` = '".mysql_real_escape_string($encrypted_md5_password)."'");
//Validate against empty fields
if($username == "" || $user_password == "")
{
$error = '<br><div class="info">Sorry, all fields are required to log into your account. Thanks.</div><br>';
}
elseif(mysql_num_rows($validate_user_information) == 1) //Check if the information of the user are valid or not
{
//The submitted info of the user are valid therefore, grant the user access to the system by creating a valid session for this user and redirect this user to the welcome page
$get_user_information = mysql_fetch_array($validate_user_information);
$_SESSION["VALID_USER_ID"] = $username;
$_SESSION["USER_FULLNAME"] = strip_tags($get_user_information["fullname"]);
header("location: index.php?page_owner=".base64_encode($username));
}
else
{
//The submitted info the user are invalid therefore, display an error message on the screen to the user
$error = '<br><div class="info">Sorry, you have provided incorrect information. Please enter correct user information to proceed. Thanks.</div><br>';
}
}
?>
<link rel="stylesheet" type="text/css" href="demo.css" media="screen" />
<link rel="stylesheet" type="text/css" href="login_panel/css/slide.css" media="screen" />
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<!-- PNG FIX for IE6 -->
<!-- http://24ways.org/2007/supersleight-transparent-png-in-ie6 -->
<!--[if lte IE 6]>
<script type="text/javascript" src="login_panel/js/pngfix/supersleight-min.js"></script>
<![endif]-->
<script src="login_panel/js/slide.js" type="text/javascript"></script>
</head>
You are free to use this login and registration system in you sites!
This tutorial was built on top of Web-Kreation's amazing sliding panel.
<div class="left">
<!-- Login Form -->
<center>
Login Here
Register Here
</div>
</div> <!-- /login -->
<!-- The tab on top -->
<div class="tab">
<ul class="login">
<li class="left"> </li>
<li>Hello Guest!</li>
<li class="sep">|</li>
<li id="toggle">
<a id="open" class="open" href="#">Log In | Register</a>
<a id="close" style="display: none;" class="close" href="#">Close Panel</a>
</li>
<li class="right"> </li>
</ul>
</div> <!-- / top -->
<div class="container">
<p>This is a simple example site demonstrating the <a href="http://tutorialzine.com/2009/10/cool-login-system-php-jquery/">Cool Login System tutorial</a> on <strong>Tutorialzine</strong>. You can start by clicking the <strong>Log In | Register</strong> button above. After registration, an email will be sent to you with your new password.</p>
<p><a href="registered.php" target="_blank">View a test page</a>, only accessible by <strong>registered users</strong>.</p>
<p>The sliding jQuery panel, used in this example, was developed by <a href="http://web-kreation.com/index.php/tutorials/nice-clean-sliding-login-panel-built-with-jquery" title="Go to site">Web-Kreation</a>.</p>
<p>You are free to build upon this code and use it in your own sites.</p>
<div class="clear"></div>
</div>
<div class="container tutorial-info">
This is a tutorialzine demo. View the <a href="http://tutorialzine.com/2009/10/cool-login-system-php-jquery/" target="_blank">original tutorial</a>, or download the <a href="demo.zip">source files</a>. </div>
</div>
progress i managed to add a logo
[php]<?php
session_start();
ob_start();
//Include the database connection file
include “config.php”;
//Check to see if the submit button has been clicked to process data
if(isset($_POST[“submitted”]) && $_POST[“submitted”] == “yes”)
{
//Variables Assignment
$username = trim(strip_tags($_POST[‘username’]));
$user_password = trim(strip_tags($_POST[‘passwd’]));
$encrypted_md5_password = md5($user_password);
$validate_user_information = mysql_query("select * from `friendship_system_users_table` where `username` = '".mysql_real_escape_string($username)."' and `password` = '".mysql_real_escape_string($encrypted_md5_password)."'");
//Validate against empty fields
if($username == "" || $user_password == "")
{
$error = '<br><div class="info">Sorry, all fields are required to log into your account. Thanks.</div><br>';
}
elseif(mysql_num_rows($validate_user_information) == 1) //Check if the information of the user are valid or not
{
//The submitted info of the user are valid therefore, grant the user access to the system by creating a valid session for this user and redirect this user to the welcome page
$get_user_information = mysql_fetch_array($validate_user_information);
$_SESSION["VALID_USER_ID"] = $username;
$_SESSION["USER_FULLNAME"] = strip_tags($get_user_information["fullname"]);
header("location: index.php?page_owner=".base64_encode($username));
}
else
{
//The submitted info the user are invalid therefore, display an error message on the screen to the user
$error = '<br><div class="info">Sorry, you have provided incorrect information. Please enter correct user information to proceed. Thanks.</div><br>';
}
}
?>
<link rel="stylesheet" type="text/css" href="demo.css" media="screen" />
<link rel="stylesheet" type="text/css" href="login_panel/css/slide.css" media="screen" />
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<!-- PNG FIX for IE6 -->
<!-- http://24ways.org/2007/supersleight-transparent-png-in-ie6 -->
<!--[if lte IE 6]>
<script type="text/javascript" src="login_panel/js/pngfix/supersleight-min.js"></script>
<![endif]-->
<script src="login_panel/js/slide.js" type="text/javascript"></script>
</head>
</div>
<div class="left">
<!-- Login Form -->
<center>
Login Here
Register Here
</div>
</div> <!-- /login -->
<!-- The tab on top -->
<div class="tab">
<ul class="login">
<li class="left"> </li>
<li>Hello Guest!</li>
<li class="sep">|</li>
<li id="toggle">
<a id="open" class="open" href="#">Log In | Register</a>
<a id="close" style="display: none;" class="close" href="#">Close Panel</a>
</li>
<li class="right"> </li>
</ul>
</div> <!-- / top -->
<div class="container">
<div class="clear"></div>
</div>
</div>
</div>
[/php]more progress
[php]<?php
session_start();
ob_start();
//Include the database connection file
include “config.php”;
//Check to see if the submit button has been clicked to process data
if(isset($_POST[“submitted”]) && $_POST[“submitted”] == “yes”)
{
//Variables Assignment
$username = trim(strip_tags($_POST[‘username’]));
$user_password = trim(strip_tags($_POST[‘passwd’]));
$encrypted_md5_password = md5($user_password);
$validate_user_information = mysql_query("select * from `friendship_system_users_table` where `username` = '".mysql_real_escape_string($username)."' and `password` = '".mysql_real_escape_string($encrypted_md5_password)."'");
//Validate against empty fields
if($username == "" || $user_password == "")
{
$error = '<br><div class="info">Sorry, all fields are required to log into your account. Thanks.</div><br>';
}
elseif(mysql_num_rows($validate_user_information) == 1) //Check if the information of the user are valid or not
{
//The submitted info of the user are valid therefore, grant the user access to the system by creating a valid session for this user and redirect this user to the welcome page
$get_user_information = mysql_fetch_array($validate_user_information);
$_SESSION["VALID_USER_ID"] = $username;
$_SESSION["USER_FULLNAME"] = strip_tags($get_user_information["fullname"]);
header("location: index.php?page_owner=".base64_encode($username));
}
else
{
//The submitted info the user are invalid therefore, display an error message on the screen to the user
$error = '<br><div class="info">Sorry, you have provided incorrect information. Please enter correct user information to proceed. Thanks.</div><br>';
}
}
?>
<link rel="stylesheet" type="text/css" href="demo.css" media="screen" />
<link rel="stylesheet" type="text/css" href="login_panel/css/slide.css" media="screen" />
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<!-- PNG FIX for IE6 -->
<!-- http://24ways.org/2007/supersleight-transparent-png-in-ie6 -->
<!--[if lte IE 6]>
<script type="text/javascript" src="login_panel/js/pngfix/supersleight-min.js"></script>
<![endif]-->
<script src="login_panel/js/slide.js" type="text/javascript"></script>
</head>
</div>
<div class="left">
<!-- Login Form -->
<center>
</div>
</div> <!-- /login -->
<!-- The tab on top -->
<div class="tab">
<ul class="login">
<li class="left"> </li>
<li>Hello Guest!</li>
<li class="sep">|</li>
<li id="toggle">
<a id="open" class="open" href="#">Log In | Register</a>
<a id="close" style="display: none;" class="close" href="#">Close Panel</a>
</li>
<li class="right"> </li>
</ul>
</div> <!-- / top -->
<div class="container">
<div class="clear"></div>
</div>
</div>
</div>
[/php]