Wednesday, September 7, 2022
HomeWordPress Developmentput up meta - get Customized discipline knowledge worth in html...

put up meta – get Customized discipline knowledge worth in html desk when choose possibility in type with out reloading web page


$yr = date('Y');
   if(isset($_POST["months"])){
       $month=$_POST["months"]; }
    else {
    $month = date('F');
}
$departure_data = json_decode(get_post_meta($post->ID, $month.'_departure', true));
?>
<?php
if ($departure_data) { ?>
<h3 id="departures" class="text-center padding2">Group Be part of Trekking - 2022</h3><div class="alignright padding2"><type methodology="POST" motion="">
    <choose title="months" onchange="this.type.submit()">
        <possibility worth="" disabled chosen>Choose Month</possibility>
        <possibility worth="September">September</possibility>
        <possibility worth="October">October</possibility>
        <possibility worth="November">November</possibility>
        <possibility worth="December">December</possibility>
    </choose>
</type></div>
<desk><tbody><tr><td>Departure Dates</td><td>Worth in USD</td><td>House Left</td><td>Reserving</td></tr>
        <?php foreach ($departure_data as $group_join) { ?>
    <tr><td><?= $group_join->tripdate . ' ,'. $yr ?> </td>
        <td><?php echo $two_pax; ?> </td>
        <td><?= $group_join->spaceleft;  ?> </td>
        <td> <button kind="button" onclick="location.href="https://wordpress.stackexchange.com/?journey=[trip]&date=<?= $group_join->tripdate; ?>"">Inquire</button></td>
        </tr>
        <?php } ?>
    </tbody>
</desk>    
<?php  
} else { 
 echo "No Departure accessible!"; };

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments