<commit_before><?php
$mem_id = $_COOKIE['id'];

require_once('variable.php');

$dbconnect = mysqli_connect(HOST, USERNAME, PASSWORD, DATABASE) or die('connection failed');

$query1 = "SELECT * FROM cart";
$result1 = mysqli_query($dbconnect, $query1) or die('cart query failed');

$query2 = "SELECT * FROM products";
$result2 = mysqli_query($dbconnect, $query2) or die('product query failed');

include 'head.php';
 ?>

<div class="row">
  <div class="col-xs-12 text-center">
    <h1>Your Cart</h1>
      <br /><br />
  </div>
</div>
<div class="row">
  <div class="col-xs-1"></div>
  <div class="col-xs-10">
  <?php

while($row1 = mysqli_fetch_array($result1)){
  if($row1['mem_id'] == $mem_id){
    $result2 = mysqli_query($dbconnect, $query2) or die('product query failed');
    while($row2 = mysqli_fetch_array($result2)){
      if($row2['id'] == $row1['product_id']){
          echo '<article class="clearfix panel panel-default">';
          echo '<div class="col-xs-4"><img src="'. $row2['picture'] .'" alt="Products" /> </div>';
          echo  '<div class="col-xs-8"><h3>' . $row2['title'] . '</h3>';
          echo '<p>Price: $' . $row2['price'] . '</p>';
          echo  '<p>'. $row2['shortdescription'] . '</p>';
          echo  '</article>';
      };
    };
  };
};
  ?>
  </div>
</div>

<div class="row">
  <div class="col-xs-12 text-center">
      <br /><br /><commit_msg>Cart Styles<commit_after><?php
$mem_id = $_COOKIE['id'];

require_once('variable.php');

$dbconnect = mysqli_connect(HOST, USERNAME, PASSWORD, DATABASE) or die('connection failed');

$query1 = "SELECT * FROM cart";
$result1 = mysqli_query($dbconnect, $query1) or die('cart query failed');

$query2 = "SELECT * FROM products";
$result2 = mysqli_query($dbconnect, $query2) or die('product query failed');

include 'head.php';
 ?>
<br /><br />
<div class="row">
	<div class="col-sm-1 text-center"></div>
  <div class="col-sm-10 text-center">
	<article class="clearfix panel panel-default">
  	<h1>Your Cart</h1>
	</article>
  </div>
</div>
<div class="row">
  <div class="col-xs-1"></div>
  <div class="col-xs-10">
  <?php

while($row1 = mysqli_fetch_array($result1)){
  if($row1['mem_id'] == $mem_id){
    $result2 = mysqli_query($dbconnect, $query2) or die('product query failed');
    while($row2 = mysqli_fetch_array($result2)){
      if($row2['id'] == $row1['product_id']){
          echo '<article class="clearfix panel panel-default">';
          echo '<div class="col-xs-4"><img src="'. $row2['picture'] .'" alt="Products" /> </div>';
          echo  '<div class="col-xs-8"><h3>' . $row2['title'] . '</h3>';
          echo '<p>Price: $' . $row2['price'] . '</p>';
          echo  '<p>'. $row2['shortdescription'] . '</p>';
          echo  '</article>';
      };
    };
  };
};
  ?>
  </div>
</div>

<div class="row">
  <div class="col-xs-12 text-center">
      <br /><br />
{'fraction_non_alphanumeric': 0.23184357541899442, 'fraction_numerical': 0.022695530726256984, 'mean_word_length': 3.5987158908507224, 'pattern_counts': {'":': 0, '<': 71, '<?xml version=': 0, '>': 71, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3237018', 'n_tokens_mistral': 1073, 'n_tokens_neox': 1053, 'n_words': 219}