I created a form here http://northshorewebdesign.net/alex/lab10Q5b.php. What I'd like it to do is take the number entered into the text field (3 for example) and show it as 'K' for strikeouts. Right now, if you enter 3 for Josh Beckett the results show Josh Bec4KKKett. I don't want the 4 just the KKKKs. I cannot figure this out. I also have to loop through two other choices. Here's my code:
<form name="steeeerike" method="post" action="">
<input type="hidden" name="nostrikes" value="0">
enter number of strike-outs for each pitcher:
<ul>
<li>Josh Beckett <input type="text" name="josh" value="" size="10">
<li>Dice-K <input type="text" name="dice" value="" size="10">
<li>Tim Wakefield <input type="text" name="tim" value="" size="10">
</ul>
<input type="submit" name="submit" value="make KKKKKK's" >
</form>
<br>
<br>
<?
$josh = $_POST['josh'];
$dice = $_POST['dice'];
$tim = $_POST['tim'];
?>
<?
for ($i=1; $i <=$josh; $i += 1)
{
$josh[$i] = "K";
}
?>
<span style="background-color:#FFFFFF; padding: 3px; border: solid 1px #000;">Josh Bec<? echo $josh?>ett</span>
Any suggestions/ help would be great - thanks