Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if(!isset($_SESSION))
- {
- session_start();
- }
- ?>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <!--
- Supremacy4T by 4Templates | http://www.4templates.com/free/ | @4templates
- Licensed under the Creative Commons Attribution 3.0 License
- -->
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title>Home</title>
- <link href="http://fonts.googleapis.com/css?family=Abel" rel="stylesheet" type="text/css" />
- <link href="../styles/default.css" rel="stylesheet" type="text/css" media="all" />
- </head>
- <body>
- <div id="wrapper">
- <div id="wrapper-bgtop">
- <div id="wrapper-bgbtm">
- <div id="header">
- <div id="logo">
- <h1><a href="#">Barzzar Ceramics</a></h1>
- <p>Contempary desings, old school service</p>
- </div>
- <div id="search">
- </div>
- </div>
- <div id="menu">
- <?php
- if (!isset($_SESSION['logged']) && !isset($_SESSION['logged_admin']))
- echo "
- <ul>
- <li class='active'><a href='../index.php' accesskey='1' title='Index'><span>Home</span></a></li>
- <li><a href='login.php' accesskey='2' title=''><span>Login</span></a></li>
- <li><a href='register.php' accesskey='3' title=''><span>register</span></a></li>
- <li><a href='catalogue.php' accesskey='4' title=''><span>catalogue</span></a></li>
- </ul>";
- elseif (isset($_SESSION['logged']) ||isset($_SESSION['logged_admin']))
- echo "
- <ul>
- <li><a href='../index.php' accesskey='1' title='Index'><span>Home</span></a></li>
- <li><a href='catalogue.php' accesskey='4' title=''><span>catalogue</span></a></li>
- <li><a href='#' accesskey='3' title=''><span>cart</span></a></li>
- <li><a href='changepassword.php' accesskey='4' title=''><span>change password</span></a></li>
- <li><a href='#' accesskey='4' title=''><span>View orders</span></a></li>
- <li><a href='logout.php' accesskey='4' title=''><span>logout</span></a></li>
- </ul>"
- ?>
- <!-- close of changed nav-->
- <!-- not logged session nav working to this point -->
- </ul>
- </div>
- <div id="page">
- <div id="content">
- <div class="post">
- <div class="entry">
- <p class="img-margin"> </p>
- <?php
- require_once "../database/dbconn.php";
- {
- $query = "SELECT * FROM tblproducts";
- $result = mysql_query($query) or die(mysql_error());
- while ($rows = mysql_fetch_assoc($result)){
- echo"<form method='post' action='displayinfo.php'>
- <table width='500'>
- <tr>
- <td>Product code</td>
- <td>{$rows['Product_code']}</td>
- </tr>
- <input type='hidden' name='prodid' value='{$rows['Product_code']}'/>
- <tr>
- <td>product name</td>
- <td>{$rows['Product_name']}</td>
- </tr>
- <input type='hidden' name='prodname' value='{$rows['Product_name']}'/>
- <tr>
- <td>Product descroption</td>
- <td>{$rows['Product_descroption']}</td>
- </tr>
- <tr>
- <td>Product size</td>
- <td>{$rows['Product_size']}</td>
- </tr>
- <tr>
- <td>Product price</td>
- <td>{$rows['Product_price']}</td>
- </tr>
- <input type='hidden' name='prodprice' value='{$rows['Product_price']}'/>
- <tr>
- <td>qty </td>
- <td><input type='text' name='quantity' /></td>
- </tr>
- <tr>
- <td></td>
- <td><input type='submit' value='submit' /></td>
- </tr>
- </table>
- </form>";
- }
- ?>
- <?php
- }
- ?>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div id="footer" class="container">
- <p>© Your Website Name | Supremacy4T by <a href="http://www.4templates.com/free/">4Templates</a> | Photos by <a href="http://fotogrph.com/">Fotogrph</a></p>
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment