magi Posted June 25, 2007 Share Posted June 25, 2007 Hey everyone, i am creating a calculator liek thing for an online game i run. I asked in the php thread and was told Javascript would be the best choice, however im not familiar with Javascript. What i have is echo' <td height="22">Race Selection:</td> <td height="22"><select class="inputp" name="Empiremenu">'; if ($_POST[Empiremenu]==1) $s1="selected"; if ($_POST[Empiremenu]==2) $s2="selected"; if ($_POST[Empiremenu]==3) $s3="selected"; if ($_POST[Empiremenu]==4) $s4="selected"; if ($_POST[Empiremenu]==5) $s5="selected"; if ($_POST[Empiremenu]==6) $s6="selected"; if ($_POST[Empiremenu]==7) $s7="selected"; if ($_POST[Empiremenu]== $s8="selected"; if ($_POST[Empiremenu]==9) $s9="selected"; echo'<option value="1" '.$s1.'>Dwarven (Lexima)</option>'; echo'<option value="2" '.$s2.'>Imperials (Lexima)</option>'; echo'<option value="3" '.$s3.'>Shinobi (Lexima)</option>'; echo'<option value="4" '.$s4.'>Templars (Celestial)</option>'; echo'<option value="5" '.$s5.'>Treefolk (Celestial)</option>'; echo'<option value="6" '.$s6.'>Avians (Celestial)</option>'; echo'<option value="7" '.$s7.'>Abominations (Hexion)</option>'; echo'<option value="8" '.$s8.'>Orcs (Hexion)</option>'; echo'<option value="9" '.$s9.'>Snowkin (Hexion) </option></select></td></tr>'; if($_POST[1]){echo' g-unit'; } What i want to happen is that when i change the option, i want the page to refresh and have the different text there as the unit. However i cannot get either to work so any help would be much appreciated. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.