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
FTP (File Transfer Protocol), a standard Internet protocol. This is the simplest way to exchange files among computers on the Internet. FTP is an application protocol which uses th

We need to create Web Chat Application Please read project requirements- general info- Its web chat application which supports audio as well as video chat - I do not want

Magazine WordPress Website Developer We are seeking a talented WordPress developer to turn our mockups into a functioning WordPress website. The website will comprise the fol

Monthly Poker Ranking well-matched with Wordpress My website by now have a poker ranking The ranking is pretty modest. I feed it uploading XLS files which are very simple, up

Now let us get a grip on how to interactivity add to your web documents by way of the tag. Along this tag you can add to your web pages as a guestbook, surveys, order

FaceBook share On html page (NOT WORD PRESS) I need help adding a face book share The bottom instance is what I need. It needs to pull in title, description as well as image

Connect shopping carts to software We want to connect our two websites shopping carts with the software of Shipwire (company distributing our products once they are sold online)

Buddypress Expert Wanted For Quick Task with Option of More Tasks This job is ONLY to upgrade Buddypress to current 1.9.1 version, without breaking current customization and mus

(a) When designing an interactive web site, explain five desirable stylistic points. (b) Discuss the advantages and disadvantages of showing stock levels on a commercial site.

Web programmer We want to allow logging on an S3 bucket to audit potential high usage from single users (example single IP addresses) on our Wordpress membership site. We wan