Click here to Skip to main content
15,914,071 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
PHP
error_reporting(0);
 
if($_POST)
 
{
// create an array based on chaldean numerology
 
$ar = array('A' => 1,
'B' => 2,
'C' => 3,
'D' => 4,
'E' => 5,
'F' => 8,
'G' => 3,
'H' => 5,
'I' => 1,
'J' => 1,
'K' => 2,
'L' => 3,
'M' => 4,
'N' => 5,
'O' => 7,
'P' => 8,
'Q' => 1,
'R' => 2,
'S' => 3,
'T' => 4,
'U' => 6,
'V' => 6,
'W' => 6,
'X' => 7,
'Y' => 1,
'Z' => 7);
 
//get the value entered by post method
$str = $_POST['str'];
//make it upper case. to avoid messing with small letters.
$str = strtoupper($str);
//find the length of the string entered
$len = strlen($str);
 
//set a temp value to calculate
$numero = 0;
 
//now loop through the string one by one and add the values
for($i=0; $i<$len; $i++)
{
$alpha  = $str[$i];
$numero = $ar[$alpha] + $numero;
}
//print the result
echo "NUMEROLOGY TOTAL IS: ". $numero;
}
 
?>
 
<html>
<body>
<form action="" method="post">
<input type="text" name="str"  value="" />
<input type="submit" value="calculate" />
</form>
Posted
Updated 12-Dec-12 0:18am
v2
Comments
Harsha Dev 12-Dec-12 6:15am    
http://www.asp.net/downloads/archived-v11/migration-assistants/php-to-aspnet

1 solution

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900