User:Kamuflaro/PEAR Calculator example
From YPPedia
Players use third party tools at their own risk. For a full list of third-party tools, see this category list. For official rules and regulations regarding the use and acceptable functionality of third-party tools, see this page. |
<html>
<head>
<title>PEAR</title>
</head>
<body>
<h1>Pirate Experience and Rating (<a href="http://yppedia.puzzlepirates.com/PEAR">PEAR</a>)</h1>
<?php
$PEAR_value = 0;
if (isset($_REQUEST['submit']))
{
if ($_REQUEST['navy'] > 0) $PEAR_value =$_REQUEST['navy'];
if ($_REQUEST['sf_e'] > 0) $PEAR_value = $PEAR_value + $_REQUEST['sf_e'] * $_REQUEST['sf_s'];
if ($_REQUEST['bi_e'] > 0) $PEAR_value = $PEAR_value + $_REQUEST['bi_e'] * $_REQUEST['bi_s'];
if ($_REQUEST['sa_e'] > 0) $PEAR_value = $PEAR_value + $_REQUEST['sa_e'] * $_REQUEST['sa_s'];
if ($_REQUEST['ri_e'] > 0) $PEAR_value = $PEAR_value + $_REQUEST['ri_e'] * $_REQUEST['ri_s'];
if ($_REQUEST['na_e'] > 0) $PEAR_value = $PEAR_value + $_REQUEST['na_e'] * $_REQUEST['na_s'];
if ($_REQUEST['bn_e'] > 0) $PEAR_value = $PEAR_value + $_REQUEST['bn_e'] * $_REQUEST['bn_s'];
if ($_REQUEST['gu_e'] > 0) $PEAR_value = $PEAR_value + $_REQUEST['gu_e'] * $_REQUEST['gu_s'];
if ($_REQUEST['ca_e'] > 0) $PEAR_value = $PEAR_value + $_REQUEST['ca_e'] * $_REQUEST['ca_s'];
if ($_REQUEST['ru_e'] > 0) $PEAR_value = $PEAR_value + $_REQUEST['ru_e'] * $_REQUEST['ru_s'];
if ($_REQUEST['th_e'] > 0) $PEAR_value = $PEAR_value + $_REQUEST['th_e'] * $_REQUEST['th_s'];
}
?>
<form action="pear.php">
<table>
<tr>
<td>Swordfighting:</td>
<td>
<select name="sf_e" size="1">
<option<?php if ($_REQUEST['sf_e'] == "-3"){echo " selected";} ?> value="-3">Novice</option>
<option<?php if ($_REQUEST['sf_e'] == "-2"){echo " selected";} ?> value="-2">Neophyte</option>
<option<?php if ($_REQUEST['sf_e'] == "-1"){echo " selected";} ?> value="-1">Apprentice</option>
<option<?php if ($_REQUEST['sf_e'] == "0"){echo " selected";} ?> value="0">Narrow</option>
<option<?php if ($_REQUEST['sf_e'] == "1"){echo " selected";} ?> value="1">Broad</option>
<option<?php if ($_REQUEST['sf_e'] == "2"){echo " selected";} ?> value="2">Solid</option>
<option<?php if ($_REQUEST['sf_e'] == "3"){echo " selected";} ?> value="3">Weighty</option>
<option<?php if ($_REQUEST['sf_e'] == "4"){echo " selected";} ?> value="4">Expert</option>
<option<?php if ($_REQUEST['sf_e'] == "5"){echo " selected";} ?> value="5">Paragon</option>
<option<?php if ($_REQUEST['sf_e'] == "6"){echo " selected";} ?> value="6">Illustrious</option>
<option<?php if ($_REQUEST['sf_e'] == "7"){echo " selected";} ?> value="7">Sublime</option>
</select>
</td>
<td>
<select name="sf_s" size="1">
<option<?php if ($_REQUEST['sf_s'] == "0"){echo " selected";} ?> value="0">Able</option>
<option<?php if ($_REQUEST['sf_s'] == "1"){echo " selected";} ?> value="1">Distinguished</option>
<option<?php if ($_REQUEST['sf_s'] == "2"){echo " selected";} ?> value="2">Respected</option>
<option<?php if ($_REQUEST['sf_s'] == "3"){echo " selected";} ?> value="3">Master</option>
<option<?php if ($_REQUEST['sf_s'] == "4"){echo " selected";} ?> value="4">Renowned</option>
<option<?php if ($_REQUEST['sf_s'] == "5"){echo " selected";} ?> value="5">Grand-Master</option>
<option<?php if ($_REQUEST['sf_s'] == "6"){echo " selected";} ?> value="6">Legendary</option>
<option<?php if ($_REQUEST['sf_s'] == "7"){echo " selected";} ?> value="7">Ultimate</option>
</select>
</td>
</tr>
<tr>
<td>Bilging:</td>
<td>
<select name="bi_e" size="1">
<option<?php if ($_REQUEST['bi_e'] == "-3"){echo " selected";} ?> value="-3">Novice</option>
<option<?php if ($_REQUEST['bi_e'] == "-2"){echo " selected";} ?> value="-2">Neophyte</option>
<option<?php if ($_REQUEST['bi_e'] == "-1"){echo " selected";} ?> value="-1">Apprentice</option>
<option<?php if ($_REQUEST['bi_e'] == "0"){echo " selected";} ?> value="0">Narrow</option>
<option<?php if ($_REQUEST['bi_e'] == "1"){echo " selected";} ?> value="1">Broad</option>
<option<?php if ($_REQUEST['bi_e'] == "2"){echo " selected";} ?> value="2">Solid</option>
<option<?php if ($_REQUEST['bi_e'] == "3"){echo " selected";} ?> value="3">Weighty</option>
<option<?php if ($_REQUEST['bi_e'] == "4"){echo " selected";} ?> value="4">Expert</option>
<option<?php if ($_REQUEST['bi_e'] == "5"){echo " selected";} ?> value="5">Paragon</option>
<option<?php if ($_REQUEST['bi_e'] == "6"){echo " selected";} ?> value="6">Illustrious</option>
<option<?php if ($_REQUEST['bi_e'] == "7"){echo " selected";} ?> value="7">Sublime</option>
</select>
</td>
<td>
<select name="bi_s" size="1">
<option<?php if ($_REQUEST['bi_s'] == "0"){echo " selected";} ?> value="0">Able</option>
<option<?php if ($_REQUEST['bi_s'] == "1"){echo " selected";} ?> value="1">Distinguished</option>
<option<?php if ($_REQUEST['bi_s'] == "2"){echo " selected";} ?> value="2">Respected</option>
<option<?php if ($_REQUEST['bi_s'] == "3"){echo " selected";} ?> value="3">Master</option>
<option<?php if ($_REQUEST['bi_s'] == "4"){echo " selected";} ?> value="4">Renowned</option>
<option<?php if ($_REQUEST['bi_s'] == "5"){echo " selected";} ?> value="5">Grand-Master</option>
<option<?php if ($_REQUEST['bi_s'] == "6"){echo " selected";} ?> value="6">Legendary</option>
<option<?php if ($_REQUEST['bi_s'] == "7"){echo " selected";} ?> value="7">Ultimate</option>
</select>
</td>
</tr>
<tr>
<td>Sailing:</td>
<td>
<select name="sa_e" size="1">
<option<?php if ($_REQUEST['sa_e'] == "-3"){echo " selected";} ?> value="-3">Novice</option>
<option<?php if ($_REQUEST['sa_e'] == "-2"){echo " selected";} ?> value="-2">Neophyte</option>
<option<?php if ($_REQUEST['sa_e'] == "-1"){echo " selected";} ?> value="-1">Apprentice</option>
<option<?php if ($_REQUEST['sa_e'] == "0"){echo " selected";} ?> value="0">Narrow</option>
<option<?php if ($_REQUEST['sa_e'] == "1"){echo " selected";} ?> value="1">Broad</option>
<option<?php if ($_REQUEST['sa_e'] == "2"){echo " selected";} ?> value="2">Solid</option>
<option<?php if ($_REQUEST['sa_e'] == "3"){echo " selected";} ?> value="3">Weighty</option>
<option<?php if ($_REQUEST['sa_e'] == "4"){echo " selected";} ?> value="4">Expert</option>
<option<?php if ($_REQUEST['sa_e'] == "5"){echo " selected";} ?> value="5">Paragon</option>
<option<?php if ($_REQUEST['sa_e'] == "6"){echo " selected";} ?> value="6">Illustrious</option>
<option<?php if ($_REQUEST['sa_e'] == "7"){echo " selected";} ?> value="7">Sublime</option>
</select>
</td>
<td>
<select name="sa_s" size="1">
<option<?php if ($_REQUEST['sa_s'] == "0"){echo " selected";} ?> value="0">Able</option>
<option<?php if ($_REQUEST['sa_s'] == "1"){echo " selected";} ?> value="1">Distinguished</option>
<option<?php if ($_REQUEST['sa_s'] == "2"){echo " selected";} ?> value="2">Respected</option>
<option<?php if ($_REQUEST['sa_s'] == "3"){echo " selected";} ?> value="3">Master</option>
<option<?php if ($_REQUEST['sa_s'] == "4"){echo " selected";} ?> value="4">Renowned</option>
<option<?php if ($_REQUEST['sa_s'] == "5"){echo " selected";} ?> value="5">Grand-Master</option>
<option<?php if ($_REQUEST['sa_s'] == "6"){echo " selected";} ?> value="6">Legendary</option>
<option<?php if ($_REQUEST['sa_s'] == "7"){echo " selected";} ?> value="7">Ultimate</option>
</select>
</td>
</tr>
<tr>
<td>Rigging:</td>
<td>
<select name="ri_e" size="1">
<option<?php if ($_REQUEST['ri_e'] == "-3"){echo " selected";} ?> value="-3">Novice</option>
<option<?php if ($_REQUEST['ri_e'] == "-2"){echo " selected";} ?> value="-2">Neophyte</option>
<option<?php if ($_REQUEST['ri_e'] == "-1"){echo " selected";} ?> value="-1">Apprentice</option>
<option<?php if ($_REQUEST['ri_e'] == "0"){echo " selected";} ?> value="0">Narrow</option>
<option<?php if ($_REQUEST['ri_e'] == "1"){echo " selected";} ?> value="1">Broad</option>
<option<?php if ($_REQUEST['ri_e'] == "2"){echo " selected";} ?> value="2">Solid</option>
<option<?php if ($_REQUEST['ri_e'] == "3"){echo " selected";} ?> value="3">Weighty</option>
<option<?php if ($_REQUEST['ri_e'] == "4"){echo " selected";} ?> value="4">Expert</option>
<option<?php if ($_REQUEST['ri_e'] == "5"){echo " selected";} ?> value="5">Paragon</option>
<option<?php if ($_REQUEST['ri_e'] == "6"){echo " selected";} ?> value="6">Illustrious</option>
<option<?php if ($_REQUEST['ri_e'] == "7"){echo " selected";} ?> value="7">Sublime</option>
</select>
</td>
<td>
<select name="ri_s" size="1">
<option<?php if ($_REQUEST['ri_s'] == "0"){echo " selected";} ?> value="0">Able</option>
<option<?php if ($_REQUEST['ri_s'] == "1"){echo " selected";} ?> value="1">Distinguished</option>
<option<?php if ($_REQUEST['ri_s'] == "2"){echo " selected";} ?> value="2">Respected</option>
<option<?php if ($_REQUEST['ri_s'] == "3"){echo " selected";} ?> value="3">Master</option>
<option<?php if ($_REQUEST['ri_s'] == "4"){echo " selected";} ?> value="4">Renowned</option>
<option<?php if ($_REQUEST['ri_s'] == "5"){echo " selected";} ?> value="5">Grand-Master</option>
<option<?php if ($_REQUEST['ri_s'] == "6"){echo " selected";} ?> value="6">Legendary</option>
<option<?php if ($_REQUEST['ri_s'] == "7"){echo " selected";} ?> value="7">Ultimate</option>
</select>
</td>
</tr>
<tr>
<td>Navigation:</td>
<td>
<select name="na_e" size="1">
<option<?php if ($_REQUEST['na_e'] == "-3"){echo " selected";} ?> value="-3">Novice</option>
<option<?php if ($_REQUEST['na_e'] == "-2"){echo " selected";} ?> value="-2">Neophyte</option>
<option<?php if ($_REQUEST['na_e'] == "-1"){echo " selected";} ?> value="-1">Apprentice</option>
<option<?php if ($_REQUEST['na_e'] == "0"){echo " selected";} ?> value="0">Narrow</option>
<option<?php if ($_REQUEST['na_e'] == "1"){echo " selected";} ?> value="1">Broad</option>
<option<?php if ($_REQUEST['na_e'] == "2"){echo " selected";} ?> value="2">Solid</option>
<option<?php if ($_REQUEST['na_e'] == "3"){echo " selected";} ?> value="3">Weighty</option>
<option<?php if ($_REQUEST['na_e'] == "4"){echo " selected";} ?> value="4">Expert</option>
<option<?php if ($_REQUEST['na_e'] == "5"){echo " selected";} ?> value="5">Paragon</option>
<option<?php if ($_REQUEST['na_e'] == "6"){echo " selected";} ?> value="6">Illustrious</option>
<option<?php if ($_REQUEST['na_e'] == "7"){echo " selected";} ?> value="7">Sublime</option>
</select>
</td>
<td>
<select name="na_s" size="1">
<option<?php if ($_REQUEST['na_s'] == "0"){echo " selected";} ?> value="0">Able</option>
<option<?php if ($_REQUEST['na_s'] == "1"){echo " selected";} ?> value="1">Distinguished</option>
<option<?php if ($_REQUEST['na_s'] == "2"){echo " selected";} ?> value="2">Respected</option>
<option<?php if ($_REQUEST['na_s'] == "3"){echo " selected";} ?> value="3">Master</option>
<option<?php if ($_REQUEST['na_s'] == "4"){echo " selected";} ?> value="4">Renowned</option>
<option<?php if ($_REQUEST['na_s'] == "5"){echo " selected";} ?> value="5">Grand-Master</option>
<option<?php if ($_REQUEST['na_s'] == "6"){echo " selected";} ?> value="6">Legendary</option>
<option<?php if ($_REQUEST['na_s'] == "7"){echo " selected";} ?> value="7">Ultimate</option>
</select>
</td>
</tr>
<tr>
<td>Battle Navigation:</td>
<td>
<select name="bn_e" size="1">
<option<?php if ($_REQUEST['bn_e'] == "-3"){echo " selected";} ?> value="-3">Novice</option>
<option<?php if ($_REQUEST['bn_e'] == "-2"){echo " selected";} ?> value="-2">Neophyte</option>
<option<?php if ($_REQUEST['bn_e'] == "-1"){echo " selected";} ?> value="-1">Apprentice</option>
<option<?php if ($_REQUEST['bn_e'] == "0"){echo " selected";} ?> value="0">Narrow</option>
<option<?php if ($_REQUEST['bn_e'] == "1"){echo " selected";} ?> value="1">Broad</option>
<option<?php if ($_REQUEST['bn_e'] == "2"){echo " selected";} ?> value="2">Solid</option>
<option<?php if ($_REQUEST['bn_e'] == "3"){echo " selected";} ?> value="3">Weighty</option>
<option<?php if ($_REQUEST['bn_e'] == "4"){echo " selected";} ?> value="4">Expert</option>
<option<?php if ($_REQUEST['bn_e'] == "5"){echo " selected";} ?> value="5">Paragon</option>
<option<?php if ($_REQUEST['bn_e'] == "6"){echo " selected";} ?> value="6">Illustrious</option>
<option<?php if ($_REQUEST['bn_e'] == "7"){echo " selected";} ?> value="7">Sublime</option>
</select>
</td>
<td>
<select name="bn_s" size="1">
<option<?php if ($_REQUEST['bn_s'] == "0"){echo " selected";} ?> value="0">Able</option>
<option<?php if ($_REQUEST['bn_s'] == "1"){echo " selected";} ?> value="1">Distinguished</option>
<option<?php if ($_REQUEST['bn_s'] == "2"){echo " selected";} ?> value="2">Respected</option>
<option<?php if ($_REQUEST['bn_s'] == "3"){echo " selected";} ?> value="3">Master</option>
<option<?php if ($_REQUEST['bn_s'] == "4"){echo " selected";} ?> value="4">Renowned</option>
<option<?php if ($_REQUEST['bn_s'] == "5"){echo " selected";} ?> value="5">Grand-Master</option>
<option<?php if ($_REQUEST['bn_s'] == "6"){echo " selected";} ?> value="6">Legendary</option>
<option<?php if ($_REQUEST['bn_s'] == "7"){echo " selected";} ?> value="7">Ultimate</option>
</select>
</td>
</tr>
<tr>
<td>Gunning:</td>
<td>
<select name="gu_e" size="1">
<option<?php if ($_REQUEST['gu_e'] == "-3"){echo " selected";} ?> value="-3">Novice</option>
<option<?php if ($_REQUEST['gu_e'] == "-2"){echo " selected";} ?> value="-2">Neophyte</option>
<option<?php if ($_REQUEST['gu_e'] == "-1"){echo " selected";} ?> value="-1">Apprentice</option>
<option<?php if ($_REQUEST['gu_e'] == "0"){echo " selected";} ?> value="0">Narrow</option>
<option<?php if ($_REQUEST['gu_e'] == "1"){echo " selected";} ?> value="1">Broad</option>
<option<?php if ($_REQUEST['gu_e'] == "2"){echo " selected";} ?> value="2">Solid</option>
<option<?php if ($_REQUEST['gu_e'] == "3"){echo " selected";} ?> value="3">Weighty</option>
<option<?php if ($_REQUEST['gu_e'] == "4"){echo " selected";} ?> value="4">Expert</option>
<option<?php if ($_REQUEST['gu_e'] == "5"){echo " selected";} ?> value="5">Paragon</option>
<option<?php if ($_REQUEST['gu_e'] == "6"){echo " selected";} ?> value="6">Illustrious</option>
<option<?php if ($_REQUEST['gu_e'] == "7"){echo " selected";} ?> value="7">Sublime</option>
</select>
</td>
<td>
<select name="gu_s" size="1">
<option<?php if ($_REQUEST['gu_s'] == "0"){echo " selected";} ?> value="0">Able</option>
<option<?php if ($_REQUEST['gu_s'] == "1"){echo " selected";} ?> value="1">Distinguished</option>
<option<?php if ($_REQUEST['gu_s'] == "2"){echo " selected";} ?> value="2">Respected</option>
<option<?php if ($_REQUEST['gu_s'] == "3"){echo " selected";} ?> value="3">Master</option>
<option<?php if ($_REQUEST['gu_s'] == "4"){echo " selected";} ?> value="4">Renowned</option>
<option<?php if ($_REQUEST['gu_s'] == "5"){echo " selected";} ?> value="5">Grand-Master</option>
<option<?php if ($_REQUEST['gu_s'] == "6"){echo " selected";} ?> value="6">Legendary</option>
<option<?php if ($_REQUEST['gu_s'] == "7"){echo " selected";} ?> value="7">Ultimate</option>
</select>
</td>
</tr>
<tr>
<td>Carpentry:</td>
<td>
<select name="ca_e" size="1">
<option<?php if ($_REQUEST['ca_e'] == "-3"){echo " selected";} ?> value="-3">Novice</option>
<option<?php if ($_REQUEST['ca_e'] == "-2"){echo " selected";} ?> value="-2">Neophyte</option>
<option<?php if ($_REQUEST['ca_e'] == "-1"){echo " selected";} ?> value="-1">Apprentice</option>
<option<?php if ($_REQUEST['ca_e'] == "0"){echo " selected";} ?> value="0">Narrow</option>
<option<?php if ($_REQUEST['ca_e'] == "1"){echo " selected";} ?> value="1">Broad</option>
<option<?php if ($_REQUEST['ca_e'] == "2"){echo " selected";} ?> value="2">Solid</option>
<option<?php if ($_REQUEST['ca_e'] == "3"){echo " selected";} ?> value="3">Weighty</option>
<option<?php if ($_REQUEST['ca_e'] == "4"){echo " selected";} ?> value="4">Expert</option>
<option<?php if ($_REQUEST['ca_e'] == "5"){echo " selected";} ?> value="5">Paragon</option>
<option<?php if ($_REQUEST['ca_e'] == "6"){echo " selected";} ?> value="6">Illustrious</option>
<option<?php if ($_REQUEST['ca_e'] == "7"){echo " selected";} ?> value="7">Sublime</option>
</select>
</td>
<td>
<select name="ca_s" size="1">
<option<?php if ($_REQUEST['ca_s'] == "0"){echo " selected";} ?> value="0">Able</option>
<option<?php if ($_REQUEST['ca_s'] == "1"){echo " selected";} ?> value="1">Distinguished</option>
<option<?php if ($_REQUEST['ca_s'] == "2"){echo " selected";} ?> value="2">Respected</option>
<option<?php if ($_REQUEST['ca_s'] == "3"){echo " selected";} ?> value="3">Master</option>
<option<?php if ($_REQUEST['ca_s'] == "4"){echo " selected";} ?> value="4">Renowned</option>
<option<?php if ($_REQUEST['ca_s'] == "5"){echo " selected";} ?> value="5">Grand-Master</option>
<option<?php if ($_REQUEST['ca_s'] == "6"){echo " selected";} ?> value="6">Legendary</option>
<option<?php if ($_REQUEST['ca_s'] == "7"){echo " selected";} ?> value="7">Ultimate</option>
</select>
</td>
</tr>
<tr>
<td>Rumble:</td>
<td>
<select name="ru_e" size="1">
<option<?php if ($_REQUEST['ru_e'] == "-3"){echo " selected";} ?> value="-3">Novice</option>
<option<?php if ($_REQUEST['ru_e'] == "-2"){echo " selected";} ?> value="-2">Neophyte</option>
<option<?php if ($_REQUEST['ru_e'] == "-1"){echo " selected";} ?> value="-1">Apprentice</option>
<option<?php if ($_REQUEST['ru_e'] == "0"){echo " selected";} ?> value="0">Narrow</option>
<option<?php if ($_REQUEST['ru_e'] == "1"){echo " selected";} ?> value="1">Broad</option>
<option<?php if ($_REQUEST['ru_e'] == "2"){echo " selected";} ?> value="2">Solid</option>
<option<?php if ($_REQUEST['ru_e'] == "3"){echo " selected";} ?> value="3">Weighty</option>
<option<?php if ($_REQUEST['ru_e'] == "4"){echo " selected";} ?> value="4">Expert</option>
<option<?php if ($_REQUEST['ru_e'] == "5"){echo " selected";} ?> value="5">Paragon</option>
<option<?php if ($_REQUEST['ru_e'] == "6"){echo " selected";} ?> value="6">Illustrious</option>
<option<?php if ($_REQUEST['ru_e'] == "7"){echo " selected";} ?> value="7">Sublime</option>
</select>
</td>
<td>
<select name="ru_s" size="1">
<option<?php if ($_REQUEST['ru_s'] == "0"){echo " selected";} ?> value="0">Able</option>
<option<?php if ($_REQUEST['ru_s'] == "1"){echo " selected";} ?> value="1">Distinguished</option>
<option<?php if ($_REQUEST['ru_s'] == "2"){echo " selected";} ?> value="2">Respected</option>
<option<?php if ($_REQUEST['ru_s'] == "3"){echo " selected";} ?> value="3">Master</option>
<option<?php if ($_REQUEST['ru_s'] == "4"){echo " selected";} ?> value="4">Renowned</option>
<option<?php if ($_REQUEST['ru_s'] == "5"){echo " selected";} ?> value="5">Grand-Master</option>
<option<?php if ($_REQUEST['ru_s'] == "6"){echo " selected";} ?> value="6">Legendary</option>
<option<?php if ($_REQUEST['ru_s'] == "7"){echo " selected";} ?> value="7">Ultimate</option>
</select>
</td>
</tr>
<tr>
<td>Treasure Haul:</td>
<td>
<select name="th_e" size="1">
<option<?php if ($_REQUEST['th_e'] == "-3"){echo " selected";} ?> value="-3">Novice</option>
<option<?php if ($_REQUEST['th_e'] == "-2"){echo " selected";} ?> value="-2">Neophyte</option>
<option<?php if ($_REQUEST['th_e'] == "-1"){echo " selected";} ?> value="-1">Apprentice</option>
<option<?php if ($_REQUEST['th_e'] == "0"){echo " selected";} ?> value="0">Narrow</option>
<option<?php if ($_REQUEST['th_e'] == "1"){echo " selected";} ?> value="1">Broad</option>
<option<?php if ($_REQUEST['th_e'] == "2"){echo " selected";} ?> value="2">Solid</option>
<option<?php if ($_REQUEST['th_e'] == "3"){echo " selected";} ?> value="3">Weighty</option>
<option<?php if ($_REQUEST['th_e'] == "4"){echo " selected";} ?> value="4">Expert</option>
<option<?php if ($_REQUEST['th_e'] == "5"){echo " selected";} ?> value="5">Paragon</option>
<option<?php if ($_REQUEST['th_e'] == "6"){echo " selected";} ?> value="6">Illustrious</option>
<option<?php if ($_REQUEST['th_e'] == "7"){echo " selected";} ?> value="7">Sublime</option>
</select>
</td>
<td>
<select name="th_s" size="1">
<option<?php if ($_REQUEST['th_s'] == "0"){echo " selected";} ?> value="0">Able</option>
<option<?php if ($_REQUEST['th_s'] == "1"){echo " selected";} ?> value="1">Distinguished</option>
<option<?php if ($_REQUEST['th_s'] == "2"){echo " selected";} ?> value="2">Respected</option>
<option<?php if ($_REQUEST['th_s'] == "3"){echo " selected";} ?> value="3">Master</option>
<option<?php if ($_REQUEST['th_s'] == "4"){echo " selected";} ?> value="4">Renowned</option>
<option<?php if ($_REQUEST['th_s'] == "5"){echo " selected";} ?> value="5">Grand-Master</option>
<option<?php if ($_REQUEST['th_s'] == "6"){echo " selected";} ?> value="6">Legendary</option>
<option<?php if ($_REQUEST['th_s'] == "7"){echo " selected";} ?> value="7">Ultimate</option>
</select>
</td>
</tr>
<tr>
<td>Navy Rank:</td>
<td colspan="2">
<select name="navy" size="1">
<option<?php if ($_REQUEST['navy'] == "-3"){echo " selected";} ?> value="-3">Stowaway</option>
<option<?php if ($_REQUEST['navy'] == "-2"){echo " selected";} ?> value="-2">Apprentice Sailor</option>
<option<?php if ($_REQUEST['navy'] == "-1"){echo " selected";} ?> value="-1">Sailor</option>
<option<?php if ($_REQUEST['navy'] == "0"){echo " selected";} ?> value="0">Petty Officer</option>
<option<?php if ($_REQUEST['navy'] == "1"){echo " selected";} ?> value="1">Chief Petty Officer</option>
<option<?php if ($_REQUEST['navy'] == "2"){echo " selected";} ?> value="2">Ensign</option>
<option<?php if ($_REQUEST['navy'] == "3"){echo " selected";} ?> value="3">Lieutenant</option>
<option<?php if ($_REQUEST['navy'] == "4"){echo " selected";} ?> value="4">Lieutenant Commander</option>
<option<?php if ($_REQUEST['navy'] == "5"){echo " selected";} ?> value="5">Commander</option>
<option<?php if ($_REQUEST['navy'] == "6"){echo " selected";} ?> value="6">Captain </option>
<option<?php if ($_REQUEST['navy'] == "7"){echo " selected";} ?> value="7">Admiral</option>
</select>
</td>
</tr>
</table>
<p><input name="submit" type="submit" value="Calculate" />
<input name="PEAR" readonly size="8" type="text" value="<?php echo $PEAR_value; ?>"></p>
</form>
</body>
</html>