Guest User

Untitled

a guest
Dec 16th, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.74 KB | None | 0 0
  1. Is there any other end?
  2.  
  3. I would like to get a feel for your skillset and programming approach. Please send me a php application that I can run locally. The application should:
  4.  
  5. 1. Display an html form with:
  6.  
  7. a. A dropdown field for 'Dog Breed' with the following options: Spaniel, Schnauzer, Poodle, Greyhound, Boxer, Husky
  8.  
  9. b. A dropdown field for 'Days' with the options 1 through 10
  10.  
  11. 2. When a selection from both of the dropdowns has been made, a text input field 'Dog Name' should be made visible using either javascript or jquery (put the js in the <head> of the html doc or in an external file)
  12.  
  13. 3. The form should submit to itself via POST
  14.  
  15. 4. On submission:
  16.  
  17. a. trim the dog name to 15 characters if it's greater than 15
  18.  
  19. b. the daily price for small breeds (Spaniel, Schnauzer, Poodle) should be $10/day, for large breeds (Greyhound, Boxer, Husky) it's $20/day
  20.  
  21. c. determine the total price
  22.  
  23. d. create a random alphanumeric 8 character invoice number
  24.  
  25. e. create a date string from the current timestamp in the format January 1, 2012 at 10:21am.
  26.  
  27. 5. Add the data to a mysql table with the fields: id (autoinc, primary), breed, days, name, dailyprice, totalprice, invnum, addedtime (decide the best field types, length, etc)
  28.  
  29. 6. Output: "<formattedtime>\n\nYour <dogbreed> named <trimmeddogname> can be boarded for <numdays> days at a total cost of $<totalprice>.\n\nYour invoice number is <randomalphanum>\n\nThanks"
  30.  
  31. 7. Comment the code thoroughly
  32.  
  33. 8. Send any applicable CREATE TABLE sql statements along with the application
  34.  
  35. 9. You can optimize for efficiency, encapsulate the php and html, expand the database structure, enhance security, improve the user experience, and add any style desired.
  36.  
  37. Thanks,
  38. Colin
Add Comment
Please, Sign In to add comment