Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <table cellpadding="0" cellspacing="0" border="0" class="table table-striped table-bordered" id="example">
- <thead>
- <tr>
- <th>Customer Email</th>
- <th>Shipping Company</th>
- <th>Delivery Date</th>
- <th>Tracking ID</th>
- <th>Destination Address</th>
- <th>Destination ZIP</th>
- <th>Mark As Recieved</th>
- </tr>
- </thead>
- <tbody>
- <?php
- require('config.php');
- $conn = new PDO("mysql:host=".$DB_HOST.";dbname=".$DB_NAME,$DB_USER,$DB_PASS);
- $sql = "SELECT * FROM packages_to_be_shipped_on_bremail_address";
- $q = $conn->prepare($sql);
- $q->execute();
- $q->bindColumn(2, $custemail);
- $q->bindColumn(3, $shipcompany);
- $q->bindColumn(4, $deliverydate);
- $q->bindColumn(5, $trackingid);
- $q->bindColumn(6, $destaddress);
- $q->bindColumn(7, $destzip);
- $q->bindColumn(8, $status);
- while($q->fetch()){
- ?>
- <tr class="odd gradeX">
- <td><?php echo $custemail ; ?></td>
- <td><?php echo $shipcompany; ?></td>
- <td><?php echo $deliverydate; ?></td>
- <td><?php echo $trackingid; ?></td>
- <td><?php echo $destaddress; ?></td>
- <td><?php echo $destzip; ?></td>
- <td>
- <?php
- if($status == "Pending") {
- echo "
- <form action='#' method='post' name='updatestatus'>
- <input type='submit' name='submit' value='Mark As Recieved' />
- </form>
- ";
- }
- else {
- echo "Recieved";
- }
- }
- ?>
- </td>
- </tr>
- <?php
- $status = "Recieved";
- if(isset($_POST['submit'])){
- while($q->fetch()) {
- $sql = "UPDATE packages_to_be_shipped_on_bremail_address SET status=? WHERE cust_email=?";
- $q = $conn->prepare($sql);
- $q->execute(array($status,$custemail));
- header('Location:cust_orders.php');
- }
- }
- ?>
- </tbody>
- </table>
- <table cellpadding="0" cellspacing="0" border="0" class="table table-striped table-bordered" id="example">
- <thead>
- <tr>
- <th>Customer Email</th>
- <th>Shipping Company</th>
- <th>Delivery Date</th>
- <th>Tracking ID</th>
- <th>Destination Address</th>
- <th>Destination ZIP</th>
- <th>Mark As Recieved</th>
- </tr>
- </thead>
- <tbody>
- <?php
- require('config.php');
- $conn = new PDO("mysql:host=".$DB_HOST.";dbname=".$DB_NAME,$DB_USER,$DB_PASS);
- $sql = "SELECT * FROM packages_to_be_shipped_on_bremail_address";
- $q = $conn->prepare($sql);
- $q->execute();
- $q->bindColumn(1, $pid);
- $q->bindColumn(2, $custemail);
- $q->bindColumn(3, $shipcompany);
- $q->bindColumn(4, $deliverydate);
- $q->bindColumn(5, $trackingid);
- $q->bindColumn(6, $destaddress);
- $q->bindColumn(7, $destzip);
- $q->bindColumn(8, $status);
- while($q->fetch()){
- ?>
- <tr class="odd gradeX">
- <td><?php echo $custemail ; ?></td>
- <td><?php echo $shipcompany; ?></td>
- <td><?php echo $deliverydate; ?></td>
- <td><?php echo $trackingid; ?></td>
- <td><?php echo $destaddress; ?></td>
- <td><?php echo $destzip; ?></td>
- <td>
- <?php
- if($status == "Pending") {
- echo "
- <form action='#' method='post' name='updatestatus'>
- <input type='hidden' name='pid' value='$pid'>
- <input class='btn btn-inverse' type='submit' name='submit' value='Mark As Recieved'><i class='icon-refresh icon-white'></i></input>
- </form>
- ";
- }
- else {
- echo "Recieved";
- }
- }
- ?>
- </td>
- </tr>
- <?php
- $status = "Recieved";
- if(isset($_POST['submit'])){
- $sql = "UPDATE packages_to_be_shipped_on_bremail_address SET status=? WHERE package_id=?";
- $q = $conn->prepare($sql);
- $q->execute(array($status,$_POST['pid']));
- header('Location:cust_orders.php');
- }
- ?>
- </tbody>
- </table>
- <table cellpadding="0" cellspacing="0" border="0" class="table table-striped table-bordered" id="example">
- <thead>
- <tr>
- <th>Customer Email</th>
- <th>Shipping Company</th>
- <th>Delivery Date</th>
- <th>Tracking ID</th>
- <th>Destination Address</th>
- <th>Destination ZIP</th>
- <th>Mark As Recieved</th>
- </tr>
- </thead>
- <tbody>
- <?php
- require('config.php');
- $conn = new PDO("mysql:host=".$DB_HOST.";dbname=".$DB_NAME,$DB_USER,$DB_PASS);
- $sql = "SELECT * FROM packages_to_be_shipped_on_bremail_address";
- $q = $conn->prepare($sql);
- $q->execute();
- $q->bindColumn(2, $custemail);
- $q->bindColumn(3, $shipcompany);
- $q->bindColumn(4, $deliverydate);
- $q->bindColumn(5, $trackingid);
- $q->bindColumn(6, $destaddress);
- $q->bindColumn(7, $destzip);
- $q->bindColumn(8, $status);
- while($q->fetch()){
- ?>
- <tr class="odd gradeX">
- <td><?php echo $custemail ; ?></td>
- <td><?php echo $shipcompany; ?></td>
- <td><?php echo $deliverydate; ?></td>
- <td><?php echo $trackingid; ?></td>
- <td><?php echo $destaddress; ?></td>
- <td><?php echo $destzip; ?></td>
- <td>
- <?php
- if($status == "Pending") {
- echo "
- <form action='#' method='post' name='updatestatus'>
- <input type='submit' name='submit' value='Mark As Recieved' />
- <input type='hidden' name='cust_email' value='<?php echo $custemail; ?>' />
- </form>
- ";
- }
- else {
- echo "Recieved";
- }
- }
- ?>
- </td>
- </tr>
- <?php
- $status = "Recieved";
- if(isset($_POST['submit'])){
- while($q->fetch()) {
- $sql = "UPDATE packages_to_be_shipped_on_bremail_address SET status=? WHERE cust_email=?";
- $q = $conn->prepare($sql);
- $q->execute(array($status,$_POST['cust_email']));
- header('Location:cust_orders.php');
- }
- }
- ?>
- </tbody>
- <form action='#' method='post' name='updatestatus'>
- <table cellpadding="0" cellspacing="0" border="0" class="table table-striped table-bordered" id="example">
- <thead>
- <tr>
- <th>Customer Email</th>
- <th>Shipping Company</th>
- <th>Delivery Date</th>
- <th>Tracking ID</th>
- <th>Destination Address</th>
- <th>Destination ZIP</th>
- <th>Mark As Recieved</th>
- </tr>
- </thead>
- <tbody>
- <?php
- require('config.php');
- $conn = new PDO("mysql:host=".$DB_HOST.";dbname=".$DB_NAME,$DB_USER,$DB_PASS);
- $sql = "SELECT * FROM packages_to_be_shipped_on_bremail_address";
- $q = $conn->prepare($sql);
- $q->execute();
- $q->bindColumn(2, $custemail);
- $q->bindColumn(3, $shipcompany);
- $q->bindColumn(4, $deliverydate);
- $q->bindColumn(5, $trackingid);
- $q->bindColumn(6, $destaddress);
- $q->bindColumn(7, $destzip);
- $q->bindColumn(8, $status);
- while($q->fetch()){
- ?
- <tr class="odd gradeX">
- <td><?php echo $custemail ; ?></td>
- <td><?php echo $shipcompany; ?></td>
- <td><?php echo $deliverydate; ?></td>
- <td><?php echo $trackingid; ?></td>
- <td><?php echo $destaddress; ?></td>
- <td><?php echo $destzip; ?></td>
- <td>
- <?php
- if($status == "Pending") {
- echo "
- <input type='checkbox' name='cust_email[]' value='<?php echo $custemail; ?>' />
- ";
- }
- else {
- echo "Recieved";
- }
- }
- ?>
- </td>
- </tr>
- <tr class="odd gradeX">
- <td colspan="7">
- <input type='submit' name='submit' value='Mark As Recieved' />
- </td>
- <tr>
- </tbody></table></form>
- <?php
- $status = "Recieved";
- if(isset($_POST['submit'])){
- while($q->fetch()) {
- $sql = "UPDATE packages_to_be_shipped_on_bremail_address SET status=? WHERE cust_email=?";
- $q = $conn->prepare($sql);
- foreach($_POST['cust_email'] as $cust_email)
- $q->execute(array($status,$cust_email));
- header('Location:cust_orders.php');
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement