Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <form method="GET" action="cake.php" id="form2">
- <button type="submit" form="form2">Cheese Cake</button>
- </form>
- <?php
- require_once 'connect.php';
- if (isset($_GET['form2'])) {
- $query = $db->query("
- SELECT iname, qty FROM contain, ingredient
- WHERE cakeid IN ( SELECT cakeid FROM cake WHERE cakename = 'Cheese Cake')
- AND contain.ingredid = ingredient.ingredid
- ");
- ?>
- <?php
- if (mysql_num_rows($query) != 0) {
- while ($r = $query->mysql_fetch_array()) {
- ?>
- <div class="result">
- <h3>HELLO</h3>
- <h4><?php echo $r->iname; ?></h4>
- </div>
- <?php
- }
- }
- }
Add Comment
Please, Sign In to add comment