Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Is there any other end?
- 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:
- 1. Display an html form with:
- a. A dropdown field for 'Dog Breed' with the following options: Spaniel, Schnauzer, Poodle, Greyhound, Boxer, Husky
- b. A dropdown field for 'Days' with the options 1 through 10
- 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)
- 3. The form should submit to itself via POST
- 4. On submission:
- a. trim the dog name to 15 characters if it's greater than 15
- b. the daily price for small breeds (Spaniel, Schnauzer, Poodle) should be $10/day, for large breeds (Greyhound, Boxer, Husky) it's $20/day
- c. determine the total price
- d. create a random alphanumeric 8 character invoice number
- e. create a date string from the current timestamp in the format January 1, 2012 at 10:21am.
- 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)
- 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"
- 7. Comment the code thoroughly
- 8. Send any applicable CREATE TABLE sql statements along with the application
- 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.
- Thanks,
- Colin
Add Comment
Please, Sign In to add comment