{ "key_pair_value_system": true, "answer_rating_count": "", "question_feedback_html": { "html_star": "", "html_star_feedback": "" }, "answer_average_rating_value": "", "answer_date_js": "2024-09-26T09:05:50-04:00", "answer_date": "2024-09-26 09:05:50", "is_docs_available": "", "is_excel_available": "", "is_pdf_available": "", "count_file_available": 0, "main_page": "student_question_view", "question_id": "13822978", "url": "\/study-help\/questions\/i-really-need-help-with-this-assignment-the-assignment-is-13822978", "question_creation_date_js": "2024-09-26T09:05:50-04:00", "question_creation_date": "Sep 26, 2024 09:05 AM", "meta_title": "[Solved] I really need help with this assignment. | SolutionInn", "meta_description": "Answer of - I really need help with this assignment. The assignment is in PHP code 1 Rewrite handle_reg.php so that it uses a vari | SolutionInn", "meta_keywords": "help,assignment,php,code,1,rewrite,handle,regphp,variable,current,year,hard-coding", "question_title_h1": "I really need help with this assignment. The assignment is in PHP code 1 Rewrite handle_reg.php so that it uses a variable for the current", "question_title": "I really need help with this assignment. The assignment is in PHP", "question_title_for_js_snippet": "I really need help with this assignment The assignment is in PHP code 1 Rewrite handle reg php so that it uses a variable for the current year, instead of hard coding that value Name your file handle reg 1 php 2 For debugging purposes, add code to the beginning of the handle reg php script that prints out the values of the received variables Hint Theres a short and a long way to do this Name your file handle reg 2 php 3 Update handle reg php so that it validates the users birthday by looking at the three individual form elements month, day, and year Create a variable that represents the users birthday in the format XX DD YYYY Hint Youll have to use concatenation Name your file handle reg 3 php Submit the three modified PHP script files The code that i have is Registratio error color red Registration Results", "question_description": "

I really need help with this assignment. The assignment is in PHP code<\/p>

<\/p>

1 Rewrite handle_reg.php so that it uses a variable for the current year, instead of hard-coding that value. Name your file handle_reg_1.php<\/p>

2 For debugging purposes, add code to the beginning of the handle_reg.php script that prints out the values of the received variables. Hint: Theres a short and a long way to do this. Name your file handle_reg_2.php<\/p>

3 Update handle_reg.php so that it validates the users birthday by looking at the three individual form elements: month, day, and year. Create a variable that represents the users birthday in the format XX\/DD\/YYYY. Hint: Youll have to use concatenation. Name your file handle_reg_3.php<\/p>

Submit the three modified PHP script files.<\/p>

<\/p>

The code that i have is <\/p>

<\/p>

<\/p>

<\/p>

<\/p>

Registratio<\/title><\/p> <p><style type=\"text\/css\" media=\"screen\"><\/p> <p>.error { color: red; }<\/p> <p><\/style><\/p> <p><\/head><\/p> <p><body><\/p> <p><h1>Registration Results<\/h1><\/p> <p><?php \/\/ Script 6.2 -handle_reg.php<\/p> <p>$okay = true;<\/p> <p>if (empty($_POST['email'])) {<\/p> <p>print '<p class=\"error\">Please enter your email address.<\/p>';<\/p> <p>$okay = false;<\/p> <p>}<\/p> <p>if (empty($_POST['password'])) {<\/p> <p>print '<p class=\"error\">Please enter your password.<\/p>';<\/p> <p>$okay = false;<\/p> <p>}<\/p> <p> <\/p> <p>if (is_numeric($_POST['year'])) {<\/p> <p>$age = 2017 - $_POST['year']; <\/p> <p>} else {<\/p> <p>print '<p class=\"error\">Please enter the year you were born as four digits.<\/p>';<\/p> <p>$okay = false;<\/p> <p>}<\/p> <p> <\/p> <p>if ($okay) {<\/p> <p>print '<p> You have been successfully registered(but not really).<\/p>';<\/p> <p>print \"<p>You will turn $age this year.<\/p>\";<\/p> <p>}<\/p> <p>?><\/p> <p><\/body><\/p> <p><\/html><\/p>", "transcribed_text": "", "related_book": { "title": "Database Driven Web Sites", "isbn": "? 061906448X, 978-0619064488", "edition": "2nd Edition", "authors": "Joline Morrison, Mike Morrison", "cover_image": "https:\/\/dsd5zvtm8ll6.cloudfront.net\/si.question.images\/book_images\/6507d06315389_54981.jpg", "uri": "\/textbooks\/database-driven-web-sites-2nd-edition-9780619064488", "see_more_uri": "\/textbooks\/computer-science-voip-2747" }, "question_posted": "2024-09-26 09:05:50", "step_by_step_answer": "The Answer is in the image, click to view ...", "students_also_viewed": [ { "url": "\/study-help\/entrepreneurship\/can-most-firms-be-classified-as-rapidgrowth-firms-explain-your-2122568", "description": "Can most firms be classified as rapidgrowth firms? Explain your answer.", "stars": 0 }, { "url": "\/quarterly-and-annual-sales-for-this-year-for-steen-manufacturing", "description": "Quarterly and annual sales for this year for Steen Manufacturing Company follow. Prepare a sales budget for next year for the company based on the estimated percentage increases shown by product...", "stars": 3 }, { "url": "\/study-help\/questions\/i-really-need-help-with-this-assignment-the-assignment-is-13822978", "description": "I really need help with this assignment. The assignment is in PHP code 1 Rewrite handle_reg.php so that it uses a variable for the current year, instead of hard-coding that value. Name your file...", "stars": 3 }, { "url": "\/study-help\/questions\/colbertsells-20-nonrefundable-100gift-cards-for-3d-printer-plastic-on-3030389", "description": "Colbertsells 20 non-refundable $100gift cards for 3-D printer plastic on March 1, 2020. The plastic has a stand-alone selling price of $100(cost $80). The gift card expiration date is June 30,...", "stars": 3 }, { "url": "\/study-help\/questions\/explain-in-detail-how-the-mughal-empire-was-established-in-10799887", "description": "Explain in detail how the Mughal Empire was established in India", "stars": 3 }, { "url": "\/study-help\/questions\/problem-evaluate-the-integral-i-ze-dx-10799888", "description": "Problem: Evaluate the integral: I - -[ze dx", "stars": 3 }, { "url": "\/study-help\/questions\/what-is-the-modern-history-of-india-explain-in-detail-10799889", "description": "What is the modern history of India? Explain in detail the movements that took place in it.", "stars": 3 }, { "url": "\/study-help\/questions\/what-is-the-ancient-history-of-india-how-was-the-10799890", "description": "What is the ancient history of India? How was the Sindhu civilization in it? Explain the Sutra period, Epic period and Sangam period in detail.", "stars": 3 }, { "url": "\/study-help\/questions\/problem-evaluate-the-integral-i-1-1-dx-9-10799891", "description": "Problem: Evaluate the integral: I = 1- 1 dx 9", "stars": 3 }, { "url": "\/study-help\/cost-of-capital-in-managerial-finance\/how-do-dimensional-database-models-differ-from-relational-models-2132131", "description": "How do Dimensional Database Models differ from Relational Models?", "stars": 3 }, { "url": "\/study-help\/cost-of-capital-in-managerial-finance\/what-type-of-processing-do-relational-databases-support-2132132", "description": "What type of processing do Relational Databases support?", "stars": 3 }, { "url": "\/study-help\/cost-of-capital-in-managerial-finance\/describe-several-aggregation-operators-2132134", "description": "Describe several aggregation operators.", "stars": 3 } ], "next_back_navigation": { "previous": "\/study-help\/questions\/translates-the-following-english-sentences-into-folfirstorder-logic-representation-every-13822977", "next": "\/study-help\/questions\/1-explain-how-to-modify-bellmanfords-algorithm-to-efficiently-count-13822979" }, "breadcrumbs": [ { "name": "Study help", "link": "https:\/\/www.solutioninn.com\/study-help\/questions-and-answers" }, { "name": "Computer Science", "link": "https:\/\/www.solutioninn.com\/study-help\/questions-and-answers\/computer-science" }, { "name": "Databases", "link": "https:\/\/www.solutioninn.com\/study-help\/questions\/computer-science-databases" }, { "name": "I really need help with this assignment. The assignment is in PHP", "link": "https:\/\/www.solutioninn.com\/study-help\/questions\/i-really-need-help-with-this-assignment-the-assignment-is-13822978" } ], "skill_details": { "skill_id": "656", "skill_name": "Databases", "parent_id": "8" } } } }