3 posts by 2 authors in: Forums > CMS Builder
Last Post: October 23   (RSS)

I have an issue passing the month, day and year to a URL request with the form below. It appears to pass correctly, however; it does not filter via the request!

<?php
$today = date("j");               // day of month
$month = date("M");               // Month such as Jan
$year  = date("Y");               // Year such as 2020
?

<form action="acknowledgements.php?" method="get">
<?php $optionValues = [1,2,3,4,5,6,7,8,9,10,11,12]; ?>
<?php $optionLabels = ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec']; ?>
<?php $optionsHTML  = getSelectOptions(@$_REQUEST['acknowledge_date:mon'], $optionValues, $optionLabels); ?>
<select name='acknowledge_date:mon'  id='acknowledge_date:mon' class='form-control'><option value='<?php echo ($month); ?>'><?php echo ($month); ?></option><?php echo $optionsHTML; ?></select>
<?php $optionsHTML = getSelectOptions(@$_REQUEST['acknowledge_date:day'], range(1,31)); ?>
<select name='acknowledge_date:day'  id='acknowledge_date:day' class='form-control'><option value='<?php echo ($today); ?>'><?php echo ($today); ?></option><?php echo $optionsHTML; ?></select>
<?php $optionsHTML = getSelectOptions(@$_REQUEST['acknowledge_date:year'], range(2019, 2020)); ?>
<select name='acknowledge_date:year' id='acknowledge_date:year' class='form-control'><option value='<?php echo ($year); ?>'><?php echo ($year); ?></option><?php echo $optionsHTML; ?></select>
<input type="submit" id="acknowledge_date" class="btn btn-success btn-sm active type=" type="button" value="Print Acknowledgements">
</form>

I pass it via a URL to another page with the following header request:

// load records from 'collection_accounts'
  list($collection_accountsRecords, $collection_accountsMetaData) = getRecords(array(
    'tableName'   => 'collection_accounts',
    'allowSearch' => true,
  ));

Any help would be appreciated!

nmsinc

Worked perfect Dave - Thanks!

nmsinc