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
Wordpress Plugin Capture Vehicle Photos and description create video, submit to YouTube Project Description: I want to prepare a web based automated software program that wil

We need help for Ongoing Developer work using portal 8 Seeking a developer who has moderate to extensive experience working with Portal 8 to help build custom template websites.

I presently host my websites on Amazon EC2. I seem to be having several performance issues such as longer than expected loading times. My sites build with Wordpress. I use Cl

how can we parse resumes in different formats like doc,docx,pdf and rtf ?

What is the difference between echo, print and printf()? Echo is the basic type used to print out a string. It just illustrates the content of message written using it. It can

Wordpress Theme customization I want a wordpress theme to be customized. This is for an e-commerce website. Must Be Capable To Start Right Away. Must be capable to work on No

The next type of input is a Pull down List. With this kind you ought to use rather than and it also contain a closing tag. This control is used while w

We are needing a website similar to previous Needing a website, same concept however different design. I want someone who can code cleanly and effectively. I want it to work bug

We need help in Improvement to Dating Community Website Our website script came with a (mobile version) however members are not allowed to upload photos to the site on the mobil

NationBuilder Developer We are seeking a long term NationBuilder developer to help us at our agency we produce websites for churches as well as nonprofits on the NB platform as