Question: Hi, I am trying to learn PHP coding and would like some help in creating this HTML/PHP code, the instruction is stated below: Please create
Hi, I am trying to learn PHP coding and would like some help in creating this HTML/PHP code, the instruction is stated below:
Please create a simple HTML form to accept two names and their birthdays and compute the compatibility of the two names. It will display the names, their zodiac sign and their compatibility results in the same page through PHP echo statement.
For the computation, count the number of similar letters between the two names. Add the total count then get the remainder when divided by 6 (Computation by modulo 6). The resulting number corresponds with a letter in the acronym FLAMES. (F = 1, L = 2, A = 3, M = 4, E = 5, S= 0). Usage of any built-in PHP array or string function is allowed for the computation. Note: (The meaning of the acronyms are: F - Friends, L - Lovers, A - Anger, M - Married, E - Engaged, S - Soulmates)
In addition in creating the HTML/PHP Code, please create the following objects with the specified attributes and methods. 1.) Person Attributes: First Name, Last Name, Birthday, Zodiac (object, see below) Constructor has inputs: First Name, Last Name, Birthday *The constructor must create a Zodiac object with birthdate as input.* Methods: GetFullName() - returns the full name in the format "last name, first name" 2.) Zodiac Attributes: Zodiac Sign, Symbol, Start Date, End Date Constructor has input: Date *The constructor will open a txt file that contains the following:
Aries; Ram; March 21; April 19 Taurus; Bull; April 20; May 20 Gemini; Twins; May 21; June 21 Cancer; Crab; June 22; July 22 Leo; Lion; July 23; August 22 Virgo; Virgin; August 23; September 22 Libra; Balance; September 23; October 23 Scorpio; Scorpion; October 24; November 21 Sagittarius; Archer; November 22; December 21 Capricornus; Goat; December 22; January 19 Aquarius; Water Bearer; January 20; February 18 Pisces; Fish; February 19; March 20
from here, it will assign the zodiac sign, symbol, start date, end date based on the input date Methods: ComputeZodiacCompatibility() - takes two zodiac signs as input and outputs compatibility based on the given chart below. Utilize multidimensional arrays.
Note: The Signs arranged vertically is the 1st person while the horizontally arranged is the 2nd person Example Input: Enter First Peron's First Name: John Enter First Person's Last Name: Doe Enter First Person's Birthdate: June 22
Enter Second Peron's First Name: Jane Enter Second Person's Last Name: Doe Enter Second Person's Birthdate: February 19 Example Output:
First Person's Name: John Doe Second Person's Name: Jane Doe
John Doe - Zodiac Sign: Cancer Jane Doe - Zodiac Sign: Pisces Compatibility Result: ZODIAC: John Doe and Jane Doe are a Great Match FLAMES: John Doe and Jane Doe are Soulmates *End of Output*
Additional Note: 1. John Doe and Jane Doe are a Great Match based on the given table (First person is Cancer while second person is Pisces) 2. For the FLAMES part, John Doe and Jane Doe are Soulmates because their common letters are: J, O, N and E. "John Doe" has 6 common letters while "Jane Doe" has 6 common letters as well. 6 + 6 = 12. 12 Modulo 6 is equals to 0 from the FLAMES, S = 0, therefore, they are soulmates. I would really appreciate your help in my programming journey. Thank you very much.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
