Cash-back offer from May 2nd to 7th, 2024: Get a flat 10% cash-back credited to your account for a minimum transaction of $50.Post Your Questions Today!

Question DetailsNormal
$ 60.00

CISM 4157 – Assignment 4 | Complete Solution

Question posted by
Online Tutor Profile
request

CISM 4157 – Assignment 4
Chapter 12 – Error Handling and Validation
Instructions: Update the PHP file (i.e. ROakley_A4.php) so that it accomplishes all steps. Submit the PHP file and the 3 screenshots of the form in D2L in the Assignment 4 Dropbox. PHP section
1. Create the following variables to store error messages. Set all variables equal to an empty string. Set siteError equal to (zero) 0.
Variable names
nameError
name
commentError
email
emailError
comment
statusError
status
siteError


2. Write PHP code that will check to see if the request method used is POST. If that is true, then the user has submitted data that needs to be validated.


3. Write the PHP code to check the name field. If it is empty, set name variable to "Full Name is Required" & set siteError variable to 1. If the name field is not empty, set the name variable to the data the user entered then validate that it is in the proper format. Set nameError variable to "Only letters and white spaces allowed" if it is not in the proper format.


(HINT: the data the user entered is store in $_POST["fieldname"] where fieldname is the field of interest.)


4. Write the PHP code to check the email field. If it is empty, set email variable to "Email is Required" & set siteError variable to 1. If the email field is not empty, set the email variable to the data the user entered then validate that it is in the proper format. Set emailError variable to "Invalid email format" if it is not in the proper format.


5. Write the PHP code to check the comment field. If the comment field is empty, set commentError variable to "Comment to Advisor is Required" & set siteError variable to 1. If the comment field is not empty, set the comment variable to the data the user entered.


6. Write the PHP code to check the status field. If the status field is empty, set statusError variable to "Academic Status is Required" & set siteError variable to 1. If the status field is not empty, set the status variable to the data the user entered.


7. Write the PHP code to check if the siteError variable is not equal to 1 (which indicates there are no error messages present). If this is true, display all the data that was received from the user, else display the following error message “There is an error! Check your input.”


HTML section
8. Edit the HTML code of the form to include placeholders which give the user prompts in the browser.


9. In the PHP sections within the HTML code, echo out the appropriate comment variables as indicated.


10. Test your code and take 3 screenshots of the form:
a. Before any data is submitted
Note that the user-entered data is bolded!!
b. When no data or incorrect data is entered
c. When correct data is entered Chapter 12 – Error Handling and Validation
Instructions: Update the PHP file (i.e. ROakley_A4.php) so that it accomplishes all steps. Submit the PHP file and the 3 screenshots of the form in D2L in the Assignment 4 Dropbox. PHP section


1. Create the following variables to store error messages. Set all variables equal to an empty string. Set siteError equal to (zero) 0.
Variable names
nameError
name
commentError
email
emailError
comment
statusError
status
siteError
2. Write PHP code that will check to see if the request method used is POST. If that is true, then the user has submitted data that needs to be validated.
3. Write the PHP code to check the name field. If it is empty, set name variable to "Full Name is Required" & set siteError variable to 1. If the name field is not empty, set the name variable to the data the user entered then validate that it is in the proper format. Set nameError variable to "Only letters and white spaces allowed" if it is not in the proper format.
(HINT: the data the user entered is store in $_POST["fieldname"] where fieldname is the field of interest.)
4. Write the PHP code to check the email field. If it is empty, set email variable to "Email is Required"
& set siteError variable to 1. If the email field is not empty, set the email variable to the data the user entered then validate that it is in the proper format. Set emailError variable to "Invalid email format" if it is not in the proper format.
5. Write the PHP code to check the comment field. If the comment field is empty, set commentError variable to "Comment to Advisor is Required" & set siteError variable to 1. If the comment field is not empty, set the comment variable to the data the user entered.
6. Write the PHP code to check the status field. If the status field is empty, set statusError variable to "Academic Status is Required" & set siteError variable to 1. If the status field is not empty, set the status variable to the data the user entered.
7. Write the PHP code to check if the siteError variable is not equal to 1 (which indicates there are no error messages present). If this is true, display all the data that was received from the user, else display the following error message “There is an error! Check your input.”
HTML section
8. Edit the HTML code of the form to include placeholders which give the user prompts in the browser.
9. In the PHP sections within the HTML code, echo out the appropriate comment variables as indicated.
10. Test your code and take 3 screenshots of the form:
a. Before any data is submitted
Note that the user-entered data is bolded!!
b. When no data or incorrect data is entered
c. When correct data is entered

Available Answer
$ 60.00

[Solved] CISM 4157 – Assignment 4 | Complete Solution

  • This Solution has been Purchased 1 time
  • Submitted On 27 Mar, 2015 11:21:58
Answer posted by
Online Tutor Profile
solution
This Tutorial is rated A+ p...
Buy now to view the complete solution
Other Similar Questions
User Profile
Exper...

CISM 4157 – Assignment 4 | Complete Solution

This Tutorial is rated A+ previously,if you have any questions regarding this tutorial then you can contact me....

The benefits of buying study notes from CourseMerits

homeworkhelptime
Assurance Of Timely Delivery
We value your patience, and to ensure you always receive your homework help within the promised time, our dedicated team of tutors begins their work as soon as the request arrives.
tutoring
Best Price In The Market
All the services that are available on our page cost only a nominal amount of money. In fact, the prices are lower than the industry standards. You can always expect value for money from us.
tutorsupport
Uninterrupted 24/7 Support
Our customer support wing remains online 24x7 to provide you seamless assistance. Also, when you post a query or a request here, you can expect an immediate response from our side.
closebutton

$ 629.35