Web Development Exercise 3-1

Jan 28th, 2015
Sigchi4life
Category:
Computer Science
Price: $10 USD

Question description

Complete the weekly labs based on the following:

  • Write the code for each lab assignment using a text editor such as Notepad or Notepad++ saving the files using a .php extension.
  • The lab is to be submitted in a single zip file in the online course shell, which must contain all .php files, along with any additional files that may be necessary for your project to run (e.g., text files).
  • Any and all written answers must be entered into the online course shell with the submission of the attached lab assignment.

In this project, you will create a script that validates whether a credit card number contains only integers. Th e script will remove dashes and spaces from the string. After the dashes and spaces are removed,the script should reject the credit card number if it contains any other non-numeric characters.

else

echo "<p>Credit Card Number " .

$CreditCardNumber . " is a valid

Credit Card number.</p>";

}

}

8. Save the document as ValidateCreditCard.php in the Projects directory for Chapter 3 and upload the fi le to the server.

9. Open ValidateCreditCard.php in your Web browser by enter-ing the following URL:

http://<yourserver>/PHP_Projects/Chapter.03/Projects/ValidateCreditCard.php Test the script to see if it displays a message for an empty string, strips dashes and spaces from the credit card numbers, and identifies which credit cardnumbers are valid.

10. Close your Web browser windows.


Tutor Answer

(Top Tutor) Daniel C.
(997)
School: Boston College
PREMIUM TUTOR

Studypool has helped 1,244,100 students

8 Reviews


Summary
Quality
Communication
On Time
Value
darnay
Nov 30th, 2016
" The best tutor out there!!!! "
dontuwannaknow
Nov 21st, 2016
" Excellent work as always thanks so much "
SjSurvivor143
Nov 8th, 2016
" Thanks for the help. "
ddg82
Oct 30th, 2016
" Thanks, good work "
tinytim47
Oct 16th, 2016
" Wow this is really good.... didn't expect it. Sweet!!!! "
jestin7
Oct 7th, 2016
" This tutor is great! "
mixedballz
Oct 3rd, 2016
" excellent work as always thanks for the help "
lilmoe415
Sep 24th, 2016
" Thank you, Thank you, for top quality work, this is your guy!! "
Ask your homework questions. Receive quality answers!

Type your question here (or upload an image)

1819 tutors are online

Brown University





1271 Tutors

California Institute of Technology




2131 Tutors

Carnegie Mellon University




982 Tutors

Columbia University





1256 Tutors

Dartmouth University





2113 Tutors

Emory University





2279 Tutors

Harvard University





599 Tutors

Massachusetts Institute of Technology



2319 Tutors

New York University





1645 Tutors

Notre Dam University





1911 Tutors

Oklahoma University





2122 Tutors

Pennsylvania State University





932 Tutors

Princeton University





1211 Tutors

Stanford University





983 Tutors

University of California





1282 Tutors

Oxford University





123 Tutors

Yale University





2325 Tutors