| Added for You |
Hubs | Hubbers | Topics | Request |
| #1 in Business | Subscribe Email Print |
|
You are here: Home > Internet and Businesses Online > Web Development > Developing A Login System With PHP And MySQL |
|
Added for You - Developing A Login System With PHP And MySQL
Computerized and Biometric Time Clock Systems Component 3 – Forgot PasswordA Computerized Time Clock System is an employee time tracking system that is suitable for most organizations. A computerized time clock collects employee Punch IN (time in) and Punch OUT (time out) information and combines and collates it into management reports. These reports are typically used for generating the information required to produce the payroll.Computerized time clock systems are available in different configurations and capacities so you can build a system to match the size of your organization.The system consists of one or more punch card or access units combined with software that runs on an ordinary PC or other computer system (UNIX, LINUX etc).The punch card or access unit(s) collect the employee Punch IN (time in) and Punch OUT (time out) data and pass it onto the computer, where it is used to generate management reports and potentially the payroll. Used together the components create a A registered user may forget his password to log into the website’s system. In this case, the user will need to supply his loginid for the system to retrieve his password and send the password to the user’s registered email address. This is typically done through a simple HTML form. This HTML form typically contains 1 field and 2 buttons: 1. A login id field Assume that such a form is coded into a file named forgot.html. The following HTML code excerpt is a typical example. When the user has filled in all the fields, the forgot.php page is called when the user clicks on the Submit button. [form name="forgot" method="post" action="forgot.php"] [input name="login id" type="text" value="loginid" size="20"/][br] [input type="submit" name="submit" value="submit"/] [input type="reset" name="reset" value="reset"/] [/form] The following code excerpt can be used as part of forgot.php to process the login request. It connects to the MySQL database and queries the table used to store the registration information. @mysql_connect("localhost", "mysql_login", "mysql_pwd") or die("Cannot connect to DB! What is a Ponzi Scheme? Most interactive websites nowadays would require a user to log in into the website’s system in order to provide a customized experience for the user. Once the user has logged in, the website will be able to provide a presentation that is tailored to the user’s preferences.This is for those who don't believe me when I talk about the dangers of "mystery money" schemes.The terms "pyramid scheme" and "Ponzi scheme" are used almost interchangeably. However, the scheme for which Charles Ponzi is most remembered was not a pyramid.If you aren't aware of the story of Ponzi, you'll likely find it familiar. This man promised to double your money in 90 days, and he kept his promise -- until the day he was arrested for fraud. He had created such a personal mystique that he continued to receive money from new investors while in prison.How could someone with so many satisfied customers end up in prison? Because fraud is fraud no matter the results. Ponzi claimed to be investing peoples' money and giving them the proceeds. What he was actually doing was giving peoples' money to people who had previously "invested" in order to make it seem like everything was OK. Meanwhile, he was livi A basic login system typically contains 3 components: 1. The component that allows a user to register his preferred login id and password 2. The component that allows the system to verify and authenticate the user when he subsequently logs in 3. The component that sends the user’s password to his registered email address if the user forgets his password Such a system can be easily created using PHP and MySQL. ================================================================ Component 1 – Registration Component 1 is typically implemented using a simple HTML form that contains 3 fields and 2 buttons: 1. A preferred login id field Assume that such a form is coded into a file named register.html. The following HTML code excerpt is a typical example. When the user has filled in all the fields, the register.php page is called when the user clicks on the Submit button. [form name="register" method="post" action="register.php"] [input name="login id" type="text" value="loginid" size="20"/][br] [input name="password" type="text" value="password" size="20"/][br] [input name="email" type="text" value="email" size="50"/][br] [input type="submit" name="submit" value="submit"/] [input type="reset" name="reset" value="reset"/] [/form] The following code excerpt can be used as part of register.php to process the registration. It connects to the MySQL database and inserts a line of data into the table used to store the registration information. @mysql_connect("localhost", "mysql_login", "mysql_pwd") or die("Cannot connect to DB!"); @mysql_select_db("tbl_login") or die("Cannot select DB!"); $sql="INSERT INTO login_tbl (loginid, password and email) VALUES (".$loginid.”,”.$password.”,”.$email.”)”; $r = mysql_query($sql); if(!$r) { $err=mysql_error(); print $err; exit(); } The code excerpt assumes that the MySQL table that is used to store the registration data is named tbl_login and contains 3 fields – the loginid, password and email fields. The values of the $loginid, $password and $email variables are passed in from the form in register.html using the post method. ================================================================ Component 2 – Verification and Authentication A registered user will want to log into the system to access the functionality provided by the website. The user will have to provide his login id and password for the system to verify and authenticate. This is typically done through a simple HTML form. This HTML form typically contains 2 fields and 2 buttons: 1. A login id field Assume that such a form is coded into a file named authenticate.html. The following HTML code excerpt is a typical example. When the user has filled in all the fields, the authenticate.php page is called when the user clicks on the Submit button. [form name="authenticate" method="post" action="authenticate.php"] [input name="login id" type="text" value="loginid" size="20"/][br] [input name="password" type="text" value="password" size="20"/][br] [input type="submit" name="submit" value="submit"/] [input type="reset" name="reset" value="reset"/] [/form] The following code excerpt can be used as part of authenticate.php to process the login request. It connects to the MySQL database and queries the table used to store the registration information. @mysql_connect("localhost", "mysql_login", "mysql_pwd") or die("Cannot connect to DB!"); @mysql_select_db("tbl_login") or die("Cannot select DB!"); $sql="SELECT loginid FROM login_tbl WHERE loginid=’".$loginid.”’ and password=’”.$password.”’”; $r = mysql_query($sql); if(!$r) { $err=mysql_error(); print $err; exit(); } if(mysql_affected_rows()==0){ print "no such login in the system. please try again."; exit(); } else{ print "successfully logged into system."; //proceed to perform website’s functionality – e.g. present information to the user } As in component 1, the code excerpt assumes that the MySQL table that is used to store the registration data is named tbl_login and contains 3 fields – the loginid, password and email fields. The values of the $loginid and $password variables are passed in from the form in authenticate.html using the post method. ================================================================ Component 3 – Forgot Password A registered user may forget his password to log into the website’s system. In this case, the user will need to supply his loginid for the system to retrieve his password and send the password to the user’s registered email address. This is typically done through a simple HTML form. This HTML form typically contains 1 field and 2 buttons: 1. A login id field Assume that such a form is coded into a file named forgot.html. The following HTML code excerpt is a typical example. When the user has filled in all the fields, the forgot.php page is called when the user clicks on the Submit button. [form name="forgot" method="post" action="forgot.php"] [input name="login id" type="text" value="loginid" size="20"/][br] [input type="submit" name="submit" value="submit"/] [input type="reset" name="reset" value="reset"/] [/form] The following code excerpt can be used as part of forgot.php to process the login request. It connects to the MySQL database and queries the table used to store the registration information. @mysql_connect("localhost", "mysql_login", "mysql_pwd") or die("Cannot connect to DB!" Influencing Others: Use Five Techniques that Get You What You Want in Any Situation l the fields, the register.php page is called when the user clicks on the Submit button.I’ve had many opportunities to influence people during the past few months, from prospective clients to suppliers (on the business side) and from neighbors to customer service providers (on the personal side). I can boil down the influence techniques that work well to these five actions: Approach people with friendliness and warmth Share your point of view frankly but neutrally Listen openly to others’ opinions Be willing to negotiate Express appreciationCase in point: On a recent phone call with a banking institution's call center, I requested a credit to my account of a interest charges plus late fees incurred when statements were sent to a former address after we had moved. It was a significant dollar amount but I hoped that my request would be honored. When the customer service rep responded, "I can't do that," I simply said with a smile, "That's fine. What [form name="register" method="post" action="register.php"] [input name="login id" type="text" value="loginid" size="20"/][br] [input name="password" type="text" value="password" size="20"/][br] [input name="email" type="text" value="email" size="50"/][br] [input type="submit" name="submit" value="submit"/] [input type="reset" name="reset" value="reset"/] [/form] The following code excerpt can be used as part of register.php to process the registration. It connects to the MySQL database and inserts a line of data into the table used to store the registration information. @mysql_connect("localhost", "mysql_login", "mysql_pwd") or die("Cannot connect to DB!"); @mysql_select_db("tbl_login") or die("Cannot select DB!"); $sql="INSERT INTO login_tbl (loginid, password and email) VALUES (".$loginid.”,”.$password.”,”.$email.”)”; $r = mysql_query($sql); if(!$r) { $err=mysql_error(); print $err; exit(); } The code excerpt assumes that the MySQL table that is used to store the registration data is named tbl_login and contains 3 fields – the loginid, password and email fields. The values of the $loginid, $password and $email variables are passed in from the form in register.html using the post method. ================================================================ Component 2 – Verification and Authentication A registered user will want to log into the system to access the functionality provided by the website. The user will have to provide his login id and password for the system to verify and authenticate. This is typically done through a simple HTML form. This HTML form typically contains 2 fields and 2 buttons: 1. A login id field Assume that such a form is coded into a file named authenticate.html. The following HTML code excerpt is a typical example. When the user has filled in all the fields, the authenticate.php page is called when the user clicks on the Submit button. [form name="authenticate" method="post" action="authenticate.php"] [input name="login id" type="text" value="loginid" size="20"/][br] [input name="password" type="text" value="password" size="20"/][br] [input type="submit" name="submit" value="submit"/] [input type="reset" name="reset" value="reset"/] [/form] The following code excerpt can be used as part of authenticate.php to process the login request. It connects to the MySQL database and queries the table used to store the registration information. @mysql_connect("localhost", "mysql_login", "mysql_pwd") or die("Cannot connect to DB!"); @mysql_select_db("tbl_login") or die("Cannot select DB!"); $sql="SELECT loginid FROM login_tbl WHERE loginid=’".$loginid.”’ and password=’”.$password.”’”; $r = mysql_query($sql); if(!$r) { $err=mysql_error(); print $err; exit(); } if(mysql_affected_rows()==0){ print "no such login in the system. please try again."; exit(); } else{ print "successfully logged into system."; //proceed to perform website’s functionality – e.g. present information to the user } As in component 1, the code excerpt assumes that the MySQL table that is used to store the registration data is named tbl_login and contains 3 fields – the loginid, password and email fields. The values of the $loginid and $password variables are passed in from the form in authenticate.html using the post method. ================================================================ Component 3 – Forgot Password A registered user may forget his password to log into the website’s system. In this case, the user will need to supply his loginid for the system to retrieve his password and send the password to the user’s registered email address. This is typically done through a simple HTML form. This HTML form typically contains 1 field and 2 buttons: 1. A login id field Assume that such a form is coded into a file named forgot.html. The following HTML code excerpt is a typical example. When the user has filled in all the fields, the forgot.php page is called when the user clicks on the Submit button. [form name="forgot" method="post" action="forgot.php"] [input name="login id" type="text" value="loginid" size="20"/][br] [input type="submit" name="submit" value="submit"/] [input type="reset" name="reset" value="reset"/] [/form] The following code excerpt can be used as part of forgot.php to process the login request. It connects to the MySQL database and queries the table used to store the registration information. @mysql_connect("localhost", "mysql_login", "mysql_pwd") or die("Cannot connect to DB! In Business, Image Isn't Everything; It's The Only Thing! ields. The values of the $loginid, $password and $email variables are passed in from the form in register.html using the post method.We have all heard this lament, but how much do we practice it. With all the relaxed rules today, do we really present ourselves in the best light. It seems all the articles I see today are about how old fashioned today's workers find their supervisors or bosses to be in the way they dress, the policies they implement and the old fashioned ways in which they conduct their business. I am of the belief, and will continue to believe, that the first impression I make is the lasting one. Whether it is by phone or in person, I want to present myself in the best possible light. But then again, I am from the old school, the one today's workers are complaining about. Let's look at the companies that are still standing. After all the hoopla has passed, the companies that have used the fundamental principles of Business 101 are the ones still among us. The Intels, IBMs, Burger Kings, AT&Ts, Sears, Microsofts, Dells, Gatew ================================================================ Component 2 – Verification and Authentication A registered user will want to log into the system to access the functionality provided by the website. The user will have to provide his login id and password for the system to verify and authenticate. This is typically done through a simple HTML form. This HTML form typically contains 2 fields and 2 buttons: 1. A login id field Assume that such a form is coded into a file named authenticate.html. The following HTML code excerpt is a typical example. When the user has filled in all the fields, the authenticate.php page is called when the user clicks on the Submit button. [form name="authenticate" method="post" action="authenticate.php"] [input name="login id" type="text" value="loginid" size="20"/][br] [input name="password" type="text" value="password" size="20"/][br] [input type="submit" name="submit" value="submit"/] [input type="reset" name="reset" value="reset"/] [/form] The following code excerpt can be used as part of authenticate.php to process the login request. It connects to the MySQL database and queries the table used to store the registration information. @mysql_connect("localhost", "mysql_login", "mysql_pwd") or die("Cannot connect to DB!"); @mysql_select_db("tbl_login") or die("Cannot select DB!"); $sql="SELECT loginid FROM login_tbl WHERE loginid=’".$loginid.”’ and password=’”.$password.”’”; $r = mysql_query($sql); if(!$r) { $err=mysql_error(); print $err; exit(); } if(mysql_affected_rows()==0){ print "no such login in the system. please try again."; exit(); } else{ print "successfully logged into system."; //proceed to perform website’s functionality – e.g. present information to the user } As in component 1, the code excerpt assumes that the MySQL table that is used to store the registration data is named tbl_login and contains 3 fields – the loginid, password and email fields. The values of the $loginid and $password variables are passed in from the form in authenticate.html using the post method. ================================================================ Component 3 – Forgot Password A registered user may forget his password to log into the website’s system. In this case, the user will need to supply his loginid for the system to retrieve his password and send the password to the user’s registered email address. This is typically done through a simple HTML form. This HTML form typically contains 1 field and 2 buttons: 1. A login id field Assume that such a form is coded into a file named forgot.html. The following HTML code excerpt is a typical example. When the user has filled in all the fields, the forgot.php page is called when the user clicks on the Submit button. [form name="forgot" method="post" action="forgot.php"] [input name="login id" type="text" value="loginid" size="20"/][br] [input type="submit" name="submit" value="submit"/] [input type="reset" name="reset" value="reset"/] [/form] The following code excerpt can be used as part of forgot.php to process the login request. It connects to the MySQL database and queries the table used to store the registration information. @mysql_connect("localhost", "mysql_login", "mysql_pwd") or die("Cannot connect to DB! Why You Should Update and Test Often when Blogging for Traffic I "reset" value="reset"/]
[/form]Blogging for traffic to your website is not much different to writing articles or posting on forums. The way to succeed with blogs as traffic generators is simply to provide good content to them on a regular basis. Anybody should be able to write several hundred words relevant to an aspect of their web site and publish it on a blog.The increased influence blogs have on the internet is probably due to the more personal form of the writing, rather than the more formal style of conventional web content, and also to the increasing use of RSS feeds to provide web page content. If a blog gets a lot of visibility on the internet, and plenty of regular traffic, the web site of the blogs owner must also receive a proportion of that traffic. A blog is therefore very good for generating traffic to your web site. Not only through direct visits, but also through the search engine listings that the links provided in the blogs he The following code excerpt can be used as part of authenticate.php to process the login request. It connects to the MySQL database and queries the table used to store the registration information. @mysql_connect("localhost", "mysql_login", "mysql_pwd") or die("Cannot connect to DB!"); @mysql_select_db("tbl_login") or die("Cannot select DB!"); $sql="SELECT loginid FROM login_tbl WHERE loginid=’".$loginid.”’ and password=’”.$password.”’”; $r = mysql_query($sql); if(!$r) { $err=mysql_error(); print $err; exit(); } if(mysql_affected_rows()==0){ print "no such login in the system. please try again."; exit(); } else{ print "successfully logged into system."; //proceed to perform website’s functionality – e.g. present information to the user } As in component 1, the code excerpt assumes that the MySQL table that is used to store the registration data is named tbl_login and contains 3 fields – the loginid, password and email fields. The values of the $loginid and $password variables are passed in from the form in authenticate.html using the post method. ================================================================ Component 3 – Forgot Password A registered user may forget his password to log into the website’s system. In this case, the user will need to supply his loginid for the system to retrieve his password and send the password to the user’s registered email address. This is typically done through a simple HTML form. This HTML form typically contains 1 field and 2 buttons: 1. A login id field Assume that such a form is coded into a file named forgot.html. The following HTML code excerpt is a typical example. When the user has filled in all the fields, the forgot.php page is called when the user clicks on the Submit button. [form name="forgot" method="post" action="forgot.php"] [input name="login id" type="text" value="loginid" size="20"/][br] [input type="submit" name="submit" value="submit"/] [input type="reset" name="reset" value="reset"/] [/form] The following code excerpt can be used as part of forgot.php to process the login request. It connects to the MySQL database and queries the table used to store the registration information. @mysql_connect("localhost", "mysql_login", "mysql_pwd") or die("Cannot connect to DB! Understanding Why People Buy In Order To Close More Sales Component 3 – Forgot PasswordPeople buy for their reasons - not for yours. People don't want to be sold they want to buy. In every sales conversation there is one major benefit that will cause the person to buy and major objection that would hold them back. Everything you say has to show how this will benefit the customer. If you have 10 benefits in your product 90% of buying decision will hinge on one benefit. Remember WIIFM What's in it for me i.e. benefitsDale Carnegie once said, "When dealing with people, remember you are not dealing with creatures of logic, but with creatures of emotion, creatures bristling with prejudice and motivated by pride and vanity." In persuasion, your message has to focus on emotions, all the while maintaining a balance between logic and feelings. Logic and emotion are the two elements that make for perfect persuasion. We can be persuaded using only logic or only emotion, but the ef A registered user may forget his password to log into the website’s system. In this case, the user will need to supply his loginid for the system to retrieve his password and send the password to the user’s registered email address. This is typically done through a simple HTML form. This HTML form typically contains 1 field and 2 buttons: 1. A login id field Assume that such a form is coded into a file named forgot.html. The following HTML code excerpt is a typical example. When the user has filled in all the fields, the forgot.php page is called when the user clicks on the Submit button. [form name="forgot" method="post" action="forgot.php"] [input name="login id" type="text" value="loginid" size="20"/][br] [input type="submit" name="submit" value="submit"/] [input type="reset" name="reset" value="reset"/] [/form] The following code excerpt can be used as part of forgot.php to process the login request. It connects to the MySQL database and queries the table used to store the registration information. @mysql_connect("localhost", "mysql_login", "mysql_pwd") or die("Cannot connect to DB!"); @mysql_select_db("tbl_login") or die("Cannot select DB!"); $sql="SELECT password, email FROM login_tbl WHERE loginid=’".$loginid.”’”; $r = mysql_query($sql); if(!$r) { $err=mysql_error(); print $err; exit(); } if(mysql_affected_rows()==0){ print "no such login in the system. please try again."; exit(); } else { $row=mysql_fetch_array($r); $password=$row["password"]; $email=$row["email"]; $subject="your password"; $header="from:you@yourdomain.com"; $content="your password is ".$password; mail($email, $subject, $row, $header); print "An email containing the password has been sent to you"; } As in component 1, the code excerpt assumes that the MySQL table that is used to store the registration data is named tbl_login and contains 3 fields – the loginid, password and email fields. The value of the $loginid variable is passed from the form in forgot.html using the post method. ================================================================ Conclusion The above example is to illustrate how a very basic login system can be implemented. The example can be enhanced to include password encryption and additional functionality – e.g. to allow users to edit their login information.
HTTP = HTML link (for blogs, profiles,phorums):
Related Articles:Free Advertising With Publicity - Part III Buffering Your AdSense Income With an Email List
|