Authenticate the name and password, PHP Web Programming

Keep a list of allowed reporters and their passwords in a database table Authentication.  Define and populate the table beforehand manually using the phpMyAdmin interface to MySQL (or a command line interface if you like.) You can assume the reporter name is to be the primary key for the table.  The authentication information should have nothing to do with your UCID or MySQL passwords and name.  The table looks as follows with the appropriate data types for the columns.  The contents are NOT encrypted.

Authentication (for incident reports)

reporter_name

reporter_password

joe456

zebra

james777

checker

The PHP script should test the reporter name and password submitted from the form using a simple PHP or-die construction that queries the database for a matching reporter and password.  An SQL select command can be used but the returned data should not be accessed.  Just look up in the IT202 manual or on the online PHP manual how to tell if a select returned any rows.  If the select is defined appropriately, that will tell you if the reporter name and password were valid.   The password should not be encrypted by the browser, the script or in the database.

Caveat:

PHP:    When testing strings for equality in PHP, do not use = where you should use == (a pair of equal signs).  The PHP symbol = is for assignment statements; it is not used to compare strings; use the == equality operator for string comparison.

SQL:   When testing strings for equality in SQL, use = symbol, not the == used in PHP

Posted Date: 3/29/2013 6:01:31 AM | Location : United States







Related Discussions:- Authenticate the name and password, Assignment Help, Ask Question on Authenticate the name and password, Get Answer, Expert's Help, Authenticate the name and password Discussions

Write discussion on Authenticate the name and password
Your posts are moderated
Related Questions
Custom WordPress site dev and integration with custom data-driven application We have an current site that has been built with native WP functionality. A modest WP user table

Web Site on Cake PHP to be redesigned and Things to be added Project Description: We have a web site that has some finishing off and also fixing some bugs. We will consider I

Script to extract web data I want a script with two functionalities: - Excerpt specific text data from web sites - Find particulars of these data using Google Location ser

The JavaScript confirm alert box differs through a regular alert box in which it provides two choices to the user, OK & Cancel. Typically, you'll see confirmation boxes utilized on

Web Developer I have a website that I was functioning on with the developer for a very long time to build this site. They are no longer free/available to work on it and I really

WP - custom Theme The website is a fashion content website that must operate under Styles categories (chic, casual, street etc) where each style will have content associated to

FantasyHubFund Minimum Viable Product We want a developer that can start as soon as humanly possible on a small project build. This project consists of four pages, some pop up m

can you explain webservices

web coupon This is a assignment to capture our customers' email addresses or else cell phone numbers by offering a discount coupon. Job description- We are seeking a devel

We require a Drupal developer I'm in search of a skilled and experienced Drupal developer who can work with me on the following- a) Fix theme issues mainly related to CSS (Th