<?php
$db_host = 'localhost';
$db_name = 'bill';
$db_username = 'root';
#$db_password = 'admin09876';
$connect_to_db = mysql_connect($db_host, $db_username, $db_password)
or die("Could not connect: " . mysql_error());
mysql_select_db($db_name, $connect_to_db)
or die("Could not select DB: " . mysql_error());
$qr_result = mysql_query('SELECT * FROM users, invoices WHERE email="'.mysql_real_escape_string($_SESSION['email']).'"')
or die(mysql_error());
while($data = mysql_fetch_array($qr_result)){
echo '<tr>';
echo '<li>№' . $data['id'] .'</li>';
echo '<li>' . $data['first_name'] . ' ', $data['last_name'] . '</li>';
echo '<li>' .$data['number'].'</li>';
echo '<li>' . $data['email'] .'</li>';
echo '<li>' . $data['balance'] .'$</li>';
echo '<li>' . $data['service'] .'</li>';
echo '</tr>';
?>
</ul>
</div>
</div><!--content-->
<div class="password">
<span>Password</span>
<a href="#">Change Password</a>
</div><!--password-->
</div>
<div role="tabpanel" class="tab-pane animated bounceInLeft" id="payments">
<h5>Payments</h5>
<div class="content">
<div>
<span><b>Account Balance</b></span>
</div>
<div class="last">
<a href="#dialog" name="modal">Cash In</a>
</div>
</div><!--content-->
<div class="payment-history">
<div>
<h6>Payment History</h6>
<ul>
<?php
echo '<tr>';
echo '<li>№' . $data['user_id'] .'</li>';
echo '<li>' .$data['invoice_id'].'</li>';
echo '<li>' . $data['invoice_ammount'] .'</li>';
echo '</tr>';
}
mysql_close($connect_to_db);
?>
<?php
$db_host = 'localhost';
$db_name = 'bill';
$db_username = 'root';
#$db_password = 'admin09876';
$connect_to_db = mysql_connect($db_host, $db_username, $db_password)
or die("Could not connect: " . mysql_error());
mysql_select_db($db_name, $connect_to_db)
or die("Could not select DB: " . mysql_error());
$qr_result = mysql_query('SELECT * FROM users, invoices WHERE email="'.mysql_real_escape_string($_SESSION['email']).'"')
or die(mysql_error());
$data = mysql_fetch_array($qr_result);
echo '<tr>';
echo '<li>№' . $data['id'] .'</li>';
echo '<li>' . $data['first_name'] . ' ', $data['last_name'] . '</li>';
echo '<li>' .$data['number'].'</li>';
echo '<li>' . $data['email'] .'</li>';
echo '<li>' . $data['balance'] .'$</li>';
echo '<li>' . $data['service'] .'</li>';
echo '</tr>';
echo '<tr>';
echo '<li>№' .$data['invoice_id'].'</li>';
echo '<li>' . $data['invoice_ammount'] .'$</li>';
echo '</tr>';
while($data = mysql_fetch_array($qr_result)){
}
mysql_close($connect_to_db);
?>
$qr_result = mysql_query('SELECT * FROM users, invoices WHERE email="'.$_SESSION['email'].'"')
$qr_result = mysql_query('SELECT * FROM invoices WHERE email="'.mysql_real_escape_string($_SESSION['email']).'"')