Simple ''2 Field'' PHP Script
$30-100 USD
Bezahlt bei Lieferung
Hello,
I just need a simple PHP script to calculate the "birth number" of a name.
Here's what the simple PHP page will do:
Under "STEP 1: " the user will enter their full name.
Under "STEP 2: " the user will click the "Divine My Witch Name" button.
When they click the button, the script will:
1. Use the "birth number" calculation to display the persons birth number next to their real name they entered in step 1.
2. Grab a random "first name" and a random "last name" from the 2 lists I give you. (There will be 1000 first name and 1000 last names).
3. The random first name and last name will be displayed along with the "birth number" of this new name.
4. Under the new name some text will displayed. If the birth number of the new name and the persons real name is exactly the same, the text will say "A PERFECT MATCH!"
If it's just 1 number away, it will say, "An Excellent Match!"
If it's 2 numbers away, it will say, "An Acceptable Match!".
If it's more than 2 numbers away it will say, "Not A Good Name, Try Again"...
The user can continue hitting the "Divine My Witch Name" button as many times as they want, and it will generate a new name and birth number.
See the "Deliverables" section for full details about the code.
## Deliverables
Here's the birth number equation. We'll juse the name "John Kelly" as an example.
Each letter in the alphabet is assigned to a hard coded number.
Letters A, J, and S are equal to "1".
Letters B, K, and T are equal to "2".
Letters C, L, and U are equal to "3".
Letters D, M, and V are equal to "4".
Letters E, N, and W are equal to "5".
Letters F, O, and X are equal to "6".
Letters G, P, and Y are equal to "7".
Letters H, Q, and Z are equal to "8".
Letters I, and R are equal to "9".
So, here are the steps the script will take to calculate the birth number for any name.
EXAMPLE:
John Kelly
1+6+8+5+2+5+3+3+7 = 40
So you'll add up the numbers assigned to every letter in the name (and you'll ignore any punctuation or special characters).
But it must be a ONE digit number. So, in this case, we've got 40.
The script will need to take the first digit (a "4"), and ADD it to the 2nd digit (a "0"). 4+0 = 4.
So the birth number for that name is a "4".
If we had ended up with "32", for example... the script would add 3+2 = 5... so the birth number in that case would be "5".
This really is quite simple for someone that knows PHP well.
I'd like to avoid doing a database if possible, can I just give you the list of names and you can hardcode them? We can do a mysql database if needed, but I don't think it's necessary as the list of names will be static.
Let me know...
Thanks,
Dan
## Platform
n/a
Projekt-ID: #3351527