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
Want help in XML Template Converter Description- Produce a script that runs daily (can be activated by cronjob) and converts one XML feed into another XML feed format (convertin

Seeking for a Python Developer In search of experienced Python developer with 2+ years of Python experience. Desired Skills are Python

Web Design A digital media as well as graphic company is seeking an individual with web experience to work with the company to update as well as manage its four web sites. De

WHATSAPP WEB SOLUTION We are seeking a professional company to develop a solution that allows me to send a bulk message for a list of numbers from the web to whatsapp. This s

We need help in Site coding I have set up a marquee using a jquery plugin. a) I want to duplicate that marquee action across multiple sites using iframe or some such so that

We need help in Channel Unity Magento site setup for amazon/ebay I am in search of someone with detailed knowledge of Channel Unity software who can set up my Amazon and Ebay ac

I desire to build an Online Directory for local Maids and Cleaners I am seeking to build an online directory for maids and cleaners using Ruby On Rails and Twitter Bootstrap. Bo

Hello, I need help with php, using curl I''m working on a mini project private social network in my college so i need someone to help me how to use curl to login to remote site,

What i have: Linux based web-server to test, later website can run on windows server2012 with active directory (keep care of lower/ upper letters and so on), Domain, MySQL Database

Need help to create Magento mobile theme I have added in magento iphone theme as well as it needs to cleaning up. Ensure you have iphone/android phone with network to see the ac