detail.php 2.07 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
<?php
include 'common/header.php';
require 'koneksi.php';
?>

<br/>
<a class="btn btn-primary" href="member_menu.php"><span class="glyphicon glyphicon-chevron-left"></span>  Kembali</a>
<hr/>
<h3><span class="glyphicon glyphicon-eye-open"></span>  Menu Detail </h3>
<div class="row">				    
    <?php
    $id = ($_GET['id']);
    $det = mysql_query("select * from menu where id_menu ='$id'")or die(mysql_error());
    while ($detail = mysql_fetch_array($det)) {
        ?>
        <div class="col-md-6">
            <div align="center"><img src="picture/<?php echo $detail['gambar'] ?>" class="img-thumbnail" width="300" height="300"> </div>
        </div>
        <div class="col-md-6">
            <form action="pesan_proses.php?id=<?php echo $id; ?>" action="post">
                <table class="table" align="center" width="100%">
                    <tr>
                        <td>Nama</td>
                        <td><?php echo $detail['nama'] ?></td>
                    </tr>

                    <tr>
                        <td>Harga</td>
                        <td>Rp.<?php echo number_format($detail['harga']) ?>,-</td>
                    </tr>

                    <tr>
                        <td> Kategori </td>
                        <td>
                            <?php
                            if ($detail['kategori_id'] = 1) {
                                echo 'Makanan';
                            } else if ($detail['kategori_id'] = 2) {
                                echo 'Minuman';
                            }
                            ?>
                        </td>
                    </tr>
                    <tr>
                        <td> Jumlah </td>
                        <td> <input type="text" name="jumlah" tabindex="1" size="22" value="1" > </td>
                    </tr>
                    <tr>
                        <td> <input type="submit" class="btn btn-info" value="Pesan"> </td>
                    </tr>    
                </table>
            </form>
        </div>
        <?php
    }
    ?>
</div>
<br/>
<?php
include 'common/footer.php';
?>