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
Web scraping project (crawling and scraping user forums) We are seeking to create a web crawler/scraper that visits a few specific web forums and pulls data from a couple of fie

Magento Dynamic png image generation for a vinyl lettering website I need to create dynamic png image generation for a vinyl lettering website. Requirements- 1) Dynamicall

Need help in migrate and format content from old WP theme to new (different) WP theme Seeking for a WP expert to migrate my old site's content from its current existing theme, t

Complex JS+HTML5 Drag and Drop WYSIWYG editor We are looking for to a JavaScript Single Page Application that has the following characteristics- a) Selection of components, e

I have a WordPress website that is about 95 percent done. It was done using a template that I did a LOT of custom CSS with. I am having some issues with a couple of CSS items and I

Project Description: Web-based clinic management system with patient casenote , inventory and invoicing management. The developer we are seeking is someone experienced with ASP.

Edits to our Zen Cart website We would like to rental a developer to make the following adjustments to our Zen Cart 1.5.x online store 1) Featured Products on Main Page Ha

We are looking for Local programmer for programming work in a start-up In search of a highly skilled programmer in html, css, sql etc to work apart of a Perth startup. If you ar

After that you will adjust the space within the navigation button table. The simplest way to choose a table in Standard view is using the tag selector that displays HTML tags of el

We are in need Wix.com app build Build as well as launch an app on wix.com to automatically display a catalogue from an xml file sent via an FTP. Desired Skills are MySQL Adm