<?php
session_start();
include "includes/database.php";
include "includes/security.php";
$email=$_SESSION["pengguna"];
$dataPengguna=mysqli_query($newcon,"SELECT * from tbl_user where email='$email'");
$showData=mysqli_fetch_array($dataPengguna);
?>


<!DOCTYPE html>
<html lang="en">

<head>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>MyUniversity MarketPlace</title>

    <!-- Bootstrap Core CSS -->
    <link href="css/bootstrap.min.css" rel="stylesheet">

    <!-- Custom CSS -->
    <link href="css/heroic-features.css" rel="stylesheet">

    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
        <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
        <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->

</head>

<body>

    <!-- Navigation -->
    <nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
        <div class="container">
            <!-- Brand and toggle get grouped for better mobile display -->
            <div class="navbar-header">
                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <a class="navbar-brand" href="#">MyUniversity MarketPlace</a>
            </div>
            <!-- Collect the nav links, forms, and other content for toggling -->
            <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
                <ul class="nav navbar-nav">
                    <li class="nav-item active">
              <a class="nav-link" href="index2.php">HOME
                <span class="sr-only">(current)</span>
              </a>
            </li>
                    <li>
                        <a href="about2.php">ABOUT</a>
                    </li>
                    <li>
                        <a href="shop2.php">SHOP</a>
                    </li>
                    <li>
                        <a href="cart.php">CART</a>
                    </li>
                    <li>
                        <a href="review.php">REVIEW</a>
                    </li>
            <li class="nav-item">
              <a class="nav-link active" href="logout.php">LOGOUT</a>
            </li>

                </ul>
            </div>
            <!-- /.navbar-collapse -->
        </div>
        <!-- /.container -->
    </nav>
            


          </ul>
        </div>
      </div>
    </nav>
    <br>
    <br>
<!--payment -->
     <div class="baris">
  <div class="kol-75">
    <div class="contain">
      <form action="payment2.php" method="POST">

  <table border="0" width="1200">
    <tr>
      <td><div class="baris">
          <div class="kol-50">
            <h3>Payment Detail</h3>
            <label for="fname"><i class="fa fa-user"></i> Full Name</label>
            <input type="text" id="fname" name="firstname" value="<?php echo $showData['name']; ?>">
            <label for="email"><i class="fa fa-envelope"></i> Email</label>
            <input type="text" id="email" name="email" value="<?php echo $showData['email']; ?>">
            <label for="adr"><i class="fa fa-address-card-o"></i> Address</label>
            <input type="text" id="adr" name="address" value="<?php echo $showData['address']; ?>">
              
            </div>
          </div></td>

      <td><div class="kol-50">
            <label for="cname">Name on Card</label>
            <input type="text" id="name_of_card" name="name_of_card" placeholder="Danial John Arm">
            <label for="ccnum">Credit card number</label>
            <input type="text" id="ccn" name="ccn" placeholder="1111-2222-3333-4444">
            <label for="expmonth">Exp Month</label>
            <input type="text" id="exp_month" name="exp_month" placeholder="August">

            <div class="baris">
              <div class="kol-51">
                <label for="expyear">Exp Year</label>
                <input type="text" id="exp_year" name="exp_year" placeholder="2020">
              </div>
              <div class="kol-51">
                <label for="cvv">CVV</label>
                <input type="text" id="cvv" name="cvv" placeholder="652">
                <label for="adr"><i class="fa fa-address-card-o"></i> Total</label>
            <input type="text" id="adr" name="total" value="<?php echo $_GET['ttl']; ?>">
              </div>
            </div>
          </div>

        </div></td>


      <td> <div class="contain">
      <h4>
        <span class="price" style="color:black">
          <i class="fa fa-shopping-cart"></i>
          <b></b>
        </span>
      </h4>
      <p>Name</a> <span class="price"><?php echo $showData['name']; ?></span></p>
      <p>Total <span class="price" style="color:black">Rm<?php echo $_GET['ttl']; ?>"</span></p>
      <div class="kol-25">

        <label>
          <input type="checkbox" checked="checked" name="sameadr"> Shipping address same as billing
        </label>
       <input type="submit" value="Payment" class="btn">
      </form>
    </td>
    </div>
  </table>
</div>
</div>
</div>
</form>
<br>

<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
     <!-- Footer -->
   <footer >
      <div class="container">
      
          <p class="m-0 text-center text-white">Copyright &copy; MyUniversity MarketPlace 2018</p><br>
      </div>

      <!-- /.container -->
    </footer>

    <!-- Bootstrap core JavaScript -->
    <script src="vendor/jquery/jquery.min.js"></script>
    <script src="vendor/bootstrap/js/bootstrap.bundle.min.js"></script>

  </body>

</html>