View Single Post
  #6 (permalink)  
Old 08-20-08, 12:25 PM
snakeob snakeob is offline
Newbie Coder
 
Join Date: Jun 2008
Posts: 42
Thanks: 0
Thanked 0 Times in 0 Posts
PHP Code:

<?php

session_start
();
if(!isset(
$_SESSION['username']) || !isset($_SESSION['sid']) ||!isset($_SESSION['ip'])) {
header("Location: login.php");
exit;
}
echo 
"Welcome, " $_SESSION['username'] . "<br>";
echo 
"You can only access this page if you are logged in.";
?>
        

<html>
<head><title>1800billing</title></head>
<body>
        <center>
<h1>This is the 1800billing site</h1>
                </center>    
<?php
echo "The Client Billed Is: ",var_export($_POST[number])," for "var_export($_POST[month]), var_export($_POST[year]);
$DB "jakestest";
$link mysql_connect("localhost","root","")
        or die(
"cant connect");
mysql_select_db($DB);
?>

<table border=1 width=100% height=5>
<tr>
    <th>Account</th>
    <th>Call End</th>
    <th>Call Start</th>
    <th>Call Log</th>
    <th>Call Length</th>
    <th>Call Rate</th>
    <th>Call Charge</th>
    <th>Call Location</th>
    <th>Navi ID</th>
</tr>

<?php

$query 
mysql_query("SELECT * FROM biller");
while (
$result mysql_fetch_array($query))
    {
        
$query2 mysql_query("SELECT * FROM biller WHERE account LIKE ($_POST[number])");
        while (
$result2 mysql_fetch_array($query2))
        {
            
$query3 mysql_query("SELECT * FROM biller WHERE calldate LIKE '%($_POST[month])%'");
            while (
$result3 mysql_fetch_array($query3))
            {
                
$query4 mysql_query("SELECT * FROM biller WHERE calldate LIKE '%($_POST[year])%'");
                while (
$row mysql_fetch_array($query4MYSQL_ASSOC))
                {
    
$account=$row['account'];
    
$calldend=$row['calldateend'];
    
$calldstart=$row['calldatestart'];
    
$calldate=$row['calldate'];
    
$totalctime=$row['totalcalltime'];
    
$totalccharge=$row['totalcallcharge'];
    
$charge=$row['charge'];
    
$origin=$row['origin'];
    
$navi=$row['navigataid'];

print 
"<tr>
    <td>
$account</td>
    <td>
$calldend</td>
    <td>
$calldstart</td>
    <td>
$calldate</td>
    <td>
$totalctime</td>
    <td>
$totalccharge</td>
    <td>
$charge</td>
    <td>
$origin</td>
    <td>
$navi</td>
</tr>"
;
}}}
}
?>

<?php
echo "<table>";
echo 
$_SESSION['username'] . " would you like to send this email to, " $_SESSION['email'];
echo 
"<form action='emailconfirm.php' method ='POST'>
<tr><td><p><input type='submit' value='Send E-mail'></p></td></tr>
</form>"
;
echo 
"</table>";
?>

</table>
</body>
</html>

nothing prints on my table please help me.....

this is supposed to get the clients the months and the year

help me pleeeeeease
Reply With Quote