I was up all night trying in vain to get my form to load into a table. I can't for the life of me figure out what is wrong with this code. The variable $rectype definitely has the value of 2 and $recweekly is set, yet none of the code seems to be executing within the if. I don't know what else to try. It doesn't even show the value of $days. I have trouble understanding the php manual, but I did make a valiant effort... I guess I was born without the php gene. Please help. Thanks.
Code:if (isset($_POST['rectype']) && $_POST['rectype'] == '2' ) { if (isset($_POST['recweekly'])) { $days = ( (in_array(0, $_POST['recweekly'])) ? 'y' : 'n' ) . ( (in_array(1, $_POST['recweekly'])) ? 'y' : 'n' ) . ( (in_array(2, $_POST['recweekly'])) ? 'y' : 'n' ) . ( (in_array(3, $_POST['recweekly'])) ? 'y' : 'n' ) . ( (in_array(4, $_POST['recweekly'])) ? 'y' : 'n' ) . ( (in_array(5, $_POST['recweekly'])) ? 'y' : 'n' ) . ( (in_array(6, $_POST['recweekly'])) ? 'y' : 'n' ); } else { $days = "nnnnnnn"; } $wkofmon = "nnnnn"; $freq = ( $_POST['week_freq'] ? $_POST['week_freq'] : 1 ); echo $days; echo $wkofmon; exit; } //end weekly



Reply With Quote

Bookmarks