<?php 
if  (isset($_POST['submitbooking'])) {
$checkin = $mysqli->real_escape_string(stripslashes($_REQUEST['checkin']));
$checkin_monthday = substr($checkin, 0,2);
$checkin_year_month = substr($checkin, 6,4).substr($checkin, 2,3);
$checkout = $mysqli->real_escape_string(stripslashes($_REQUEST['checkout']));
$checkout_monthday = substr($checkout, 0,2);
$checkout_year_month = substr($checkout, 6,4).substr($checkout, 2,3);
$adults = $mysqli->real_escape_string(stripslashes($_REQUEST['adults']));
?>
<meta http-equiv="refresh" content="0;URL=<?php echo $resurl ?>?checkin_monthday=<?php echo $checkin_monthday ?>&amp;checkin_year_month=<?php echo $checkin_year_month ?>&amp;checkout_monthday=<?php echo $checkout_monthday ?>&amp;checkout_year_month=<?php echo $checkout_year_month ?>&amp;group_adults=<?php echo $adults ?>">   
<?php } ?>
<form name="formbooking" method="post" target="_blank">
<label for="checkin" class="hlabel"><?php echo $checkin ?></label>
<input type="text" name="checkin" id="checkin" placeholder="<?php echo $checkin ?>" size="10" class="forms1 formsb calendar" required>
<label for="checkout" class="hlabel"><?php echo $checkout ?></label>
<input type="text" name="checkout" id="checkout" placeholder="<?php echo $checkout ?>" size="10" class="forms1 formsb calendar" required>
<label for="adults" class="hlabel"><?php echo $fieldadults ?></label>
<select name="adults" id="adults" class="icon forms1 formsp">
<option value="1">&#xf2c0; 1</option>
<option value="2" selected>&#xf2c0; 2</option>
<option value="3">&#xf2c0; 3</option>
<option value="4">&#xf2c0; 4</option>
<option value="5">&#xf2c0; 5</option>
<option value="6">&#xf2c0; 6</option>
</select>
<input type="submit" name="submitbooking" value="<?php echo $buttonbooking ?>" class="button buttonb">
</form>