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
I need help in Styling Live XML Feed Need the reordering and styling of a short (dynamic) xml feed. The results are to be displayed within an external webpage. Additional wor

We need a wordpress expert I have a wordpress website which have few issues with login and PayPal. Therefore I need a wordpress expert who can solve all those issue tomorrow.

implmentation

Project Description: I am seeking an add-on to be coded for the Xenforo forum software. The add-on would be a post pruning system that will be customized on a per-forum level. I

LinkedIn JavaScript API on WordPress site I would like assistance implementing LinkedIn JavaScript API so users of my WordPress site can "Sign In With LinkedIn". The goal is

SVG Programmer SVG, CSS, AJAX, JAVA knowledge necessary Job Description: We're seeking a Web Application Developer Your responsibilities- Linking SVG element to another el

I am in search of Wufoo API Expert I am seeking someone who is skilled with Wufoo's form API. The task needs submitting wufoo form xml to another site. Please offer relevant exp

For storing pages now that a site structure is set up & assets for the Compass site, you'll develop the first page-a home page for the site. As you develop this page, you'll insert

We need help in Casino site - Bitcoin payment Need a ready solution to launch a casino site which accepts crypto currencies. I want it urgently and would be interested in hearin

Website Design for Music Portal I need to launch music portal in India. I am asking anybody to make the attractive design for my portal. If I like the design I will provide t