Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require_once("database.php");
- $query = 'SELECT * FROM categories
- ORDER BY categoryID';
- $statement1= $db->prepare($query);
- $statement1->execute();
- $categories = $statement1->fetchAll();
- $statement1->closecursor();
- ?>
- <!DOCTYPE html>
- <!--
- To change this license header, choose License Headers in Project Properties.
- To change this template file, choose Tools | Templates
- and open the template in the editor.
- -->
- <html>
- <head>
- <title>My Guitar Shop :: Add Product Page</title>
- <link href="../css/webPageStyle.css" rel="stylesheet" type="text/css"/>
- <meta charset="UTF-8">
- <title></title>
- </head>
- <body>
- <header><h1>Product Manager</h1></header>
- <section>
- <form action="add_product.php" method ="post" id="add_product_form">
- <label>Category</label>
- <select name="category_id">
- <?php foreach ($categories as $category): ?>
- <option value="<?php echo $category['categoryID']; ?> ">
- <?php echo $category['categoryName']; ?>
- </option>
- <?php endforeach; ?>
- </select>
- <br/>
- <label>Code</label>
- <input type="text" name="code">
- <br/>
- <label>Name</label>
- <input type="text" name="name">
- <br/>
- <label>List Price</label>
- <input type="text" name="price">
- <label>
- <input type ="submit" value="Add Product">
- </label>
- <br/>
- </form>
- <a href="../index.php">View Product List</a>
- </section>
- </main>
- <footer>
- <p>© <?php echo date("y"); ?>My Guitar Shop, Inc.</p>
- </footer>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement