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 Website design using HTML,coding etc I need to develop a very detailed and innovative liquor related website for a liquor distribution company. Job descriptio

I am looking for two brilliant website designers to join my team. I need designers, who will create websites that are compatible with all mobile devices, prepare custom websites, a

Question: (a) Write down short notes on PEAR and its coding standards. (b) Consider a server with the following settings: servername: localhost username: alfred passw

I need help in Woocommerce Theme Customization Hello you will be employed on transforming this woocommerce Generous let me if you are able. You will want to know woocommerce de

Adding shopping cart to products Seeking a person with e-commerce experience I have a site that wants to add shopping cart to all images in order to buy online. Desired Sk

I need Experienced Php developer.with subsequent skills Cakephp, Wordpress, Codeigniter , Php,Mysql,Ajax. Skills required: CakePHP, MySQL, Codeigniter, PHP, Wordpress

We need help to create Website and App Design Website is internet as well as app based. Customers register accounts with email as well as zip code Free website where custo

Need either a custom built web scraper or one that is previously created. I need this ASAP. Will be scraping simple text fields and putting data into excel/csv file. Desired Ski

Fantasy Sports Programming I want a Fantasy sports program like yahoo's fantasy platform. I want my users to be able to create leagues, and have a draft of players. They want to

I need assistance support to update Website information Update copy as well as pictures on existing website. Job description- I have a current website that I like. I simpl