Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask PHP Expert

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

PHP , Programming

  • Category:- PHP
  • Reference No.:- M9533155

Have any Question?


Related Questions in PHP

Question continue to build on the skills of providing web

Question: Continue to build on the skills of providing Web page content and structure with HTML and Web page style and layout using CSS. Demonstrate the skill of creating a dynamic Web page that includes JavaScript clien ...

Question using the course software and week one template as

Question: Using the course software and Week One Template as a starting point, create a new HTML webpage and include the following: • Write the code to display your name in the largest-size heading element. • Write the m ...

Question develop a 5-6 page word document that describes

Question: Develop a 5-6 page Word document that describes the design for a small Web site that meets the following specifications. 1. The Web site includes four or more Web pages designed according to current usability g ...

In php write a simple addtion calculator that reads in two

In PHP write a simple addtion calculator that reads in two values and then add them together and display the output. Be sure to validate both inputs and ensure that it can add 0+0 = Sum: 0. The user should be able to inp ...

Final project assignment -requirements specifications -1

FINAL PROJECT ASSIGNMENT - REQUIREMENTS / SPECIFICATIONS - 1. For the final project, you will have to make good use of your CMS using PHP and MySQL for the content delivery. You will have to be able to deliver the conten ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As