I'm sure this has got to be really simple but I've been searching all night and can't fiugre out why when I try to INSERT this field into my DB it doesnt work.
The Sex field in the DB is a char(1) type
in my form I think I have it right:
//Create radio button selections for the horse sex
echo "<b>Sex:</b> ";
echo "<input type='radio' value='S' name='Sex'> Stallion ";
echo "<input type='radio' value='M' name='Sex'> Mare ";
echo "<input type='radio' value='G' name='Sex'> Gelding <br>";
its the processing page that I think I have something wrong just not sure what
$strHorseSex = $_POST['Sex'];
...
$strInsertQuery = "INSERT INTO horses (horse_name, horse_dob, horse_sex, horse_height, horse_color, horse_sire, horse_dam) ".
" VALUES ('$strHorseName', '$intHorseDOB', '$strHorseSex', '$intHorseHeight', '$strHorseColor', '$strHorseSire', '$strHorseDam')";
all my other fields are posting to the DB just fine where they should be..
do i need some type of loop that checks to see what radio button is checked or...? If so could ya please write it out, im HORRIBLE with loops..
Thanks!!
Quick response is greatly appreciated...