tried changing method to post and using $_GET[avatar_color] way no luck
<form action="" method="post"><div id="avatar_section">
<div id="avatar_stack">
<p>
<img src="herotmb/face0.png" alt="" /><input name="avatar_head" type="radio" value="face0" checked="checked" />
</p>
<p>
<img src="herotmb/face.png" alt="" /><input type="radio" name="avatar_face" value="face0" />
<img src="herotmb/face1.png" alt="" /><input name="avatar_face" type="radio" value="face1" />
<img src="herotmb/face2.png" alt="" /><input name="avatar_face" type="radio" value="face2" />
<img src="herotmb/face3.png" alt="" /><input name="avatar_face" type="radio" value="face3" />
</p>
<p>
<img src="herotmb/color0.png" alt="" /><input type="radio" name="avatar_color" value="black" id="black" />
<img src="herotmb/color1.png" alt="" /><input type="radio" name="avatar_color" value="brown" id="brown" onclick="color(brown);" />
<img src="herotmb/color2.png" alt="" /><input type="radio" name="avatar_color" value="darkbrown" id="darkbrown" onclick="color(darkbrown);" />
<img src="herotmb/color3.png" alt="" /><input type="radio" name="avatar_color" value="yellow" id="red" onclick="color(red);" />
<img src="herotmb/color4.png" alt="" /><input type="radio" name="avatar_color" value="red" id="yellow" onclick="color(yellow);" />
</p>
<?php
$selected_radio = $_GET['avatar_color'];
---line102----- if ($selected_radio == 'black') {
echo ' <p>
<img src="herotmb/hair0-black.png" alt="" /><input name="avatar_hair" type="radio" value="hair0-black" />
<img src="herotmb/hair1-black.png" alt="" /><input name="avatar_hair" type="radio" value="hair1-black" />
<img src="herotmb/hair2-black.png" alt="" /><input name="avatar_hair" type="radio" value="hair2-black" />
<img src="herotmb/hair3-black.png" alt="" /><input name="avatar_hair" type="radio" value="hair3-black" />
<img src="herotmb/hair4-black.png" alt="" /><input name="avatar_hair" type="radio" value="hair4-black" />
<img src="herotmb/hair5-black.png" alt="" /><input name="avatar_hair" type="radio" value="hair5-black" />
<img src="herotmb/hair6-black.png" alt="" /><input name="avatar_hair" type="radio" value="hair6-black" />
<img src="herotmb/hairNone-black.png" alt="" /><input name="avatar_hair" type="radio" value="hairNone" />
</p>';
}
else if ($selected_radio == 'brown') {
echo '
<p>
<img src="herotmb/hair0-brown.png" alt="" /><input name="avatar_hair" type="radio" value="hair0-brown" />
<img src="herotmb/hair1-brown.png" alt="" /><input name="avatar_hair" type="radio" value="hair1-brown" />
<img src="herotmb/hair2-brown.png" alt="" /><input name="avatar_hair" type="radio" value="hair2-brown" />
<img src="herotmb/hair3-brown.png" alt="" /><input name="avatar_hair" type="radio" value="hair3-brown" />
<img src="herotmb/hair4-brown.png" alt="" /><input name="avatar_hair" type="radio" value="hair4-brown" />
<img src="herotmb/hair4-brown.png" alt="" /><input name="avatar_hair" type="radio" value="hair4-brown" />
<img src="herotmb/hairNone-brown.png" alt="" /><input name="avatar_hair" type="radio" value="hairNone" />
</p>';
}
else if ($selected_radio == 'darkbrown') {
echo 'Table 3 Here.';
}
Notice: Undefined index: avatar_color in index20.php on line 102
(yes this is attempt 20)
Trying to make an array as you suggested, how does this look
$array = array('color'=> 'black','brown','darkbrown','red','yellow');
echo '
<p>
<img src="herotmb/$array.png" alt="" /><input type="radio" name="avatar_color" value="$array" id="$array" />';
</p>';