Почему даже при существовании user_button отображается первая форма?
<?php if(empty($productCat)): ?>
<form class="time-form" action="" method="post">
<input type="date" name="start_time" max="<?php echo date('Y-m-d'); ?>">
<input type="date" name="end_time" max="<?php echo date('Y-m-d'); ?>">
<input class="time-button" type="submit" name="time_button" value="ok">
</form>
<?php elseif(!empty($productCat)): ?>
<form class="time-form" action="" method="post">
<input type="date" name="start_time2" max="<?php echo date('Y-m-d'); ?>">
<input type="date" name="end_time2" max="<?php echo date('Y-m-d'); ?>">
<input type="hidden" name="category2" value="<?php echo $productCat[0]['category']; ?>">
<input class="time-button" type="submit" name="time_button_with_category" value="ok">
</form>
<?php elseif(isset($_POST['user_button'])): ?>
<form class="time-form" action="" method="post">
<input type="date" name="start_time3" max="<?php echo date('Y-m-d'); ?>">
<input type="date" name="end_time3" max="<?php echo date('Y-m-d'); ?>">
<input type="hidden" name="user_id3" value="<?php echo $orders[0]['user_id']; ?>">
<input class="time-button" type="submit" name="time_button_with_user" value="ok">
</form>
<?php endif; ?>