Jump to content

[SOLVED] Information is not displaying can't see why!


jigsawsoul

Recommended Posts

$tablerows is not echoing out and i can't seem to understand why. $requestid = $_GET['id']; is getting the id.

 

any help

 

<?php

session_start();

include '../../library/opendb.php';
include '../../library/config.php';
include '../../library/functions/f_login.php';
include '../../library/functions/f_nav.php';

sessionAuthenticate( );

$message .= $_SESSION["message"];

$username = $_SESSION["username"];

$result = "SELECT * FROM wbl_login WHERE username = '$username'";
$result = mysql_query ($result) or die (mysql_error());
$row = mysql_fetch_assoc ($result);

$username = $row['username'];
$username = ucwords($username);

// Current page.
$page = "commissionrequest";

$requestid = $_GET['id'];

// Get all member's information
$result = "SELECT * FROM wbl_commission
			  LEFT JOIN wbl_customers ON wbl_commission.customer_id=wbl_customers.customer_id
			  LEFT JOIN wbl_login ON wbl_customers.customer_id=wbl_login.customer_id
			  WHERE  commission_id = $requestid";

$result = mysql_query ($result) or die (mysql_error());
while($row = mysql_fetch_assoc($result)) 
{		
	$tablerows .= 
		'
		<table id="project_members">
		<tr class="alt">
			<td>
			<b>Id:</b> '.$row['commission_id'].'	<b> Username:</b> '.$row['username'].' <b> Date:</b> '.$row['date'].' <b> Status:</b> '.$row['status'].'
			<br /><br />
			<b>Description:</b> '.$row['description'].'
			<br /><br />
			<b>Comments:</b> '.$row['comments'].'
			<br /><br />
			<a href = "details.php?id='.$row['enquiry_id'].'" >Respond</a> | <a href = "update.php?id='.$row['enquiry_id'].'" >Edit</a> | 
			<a href = "delete.php?id='.$row['enquiry_id'].'" >Delete</a></td>
		</tr>
		</table>
	';

 }

?>

<?php include ('../../library/template/admin/htmlstart.php'); ?>

<div id="wrap" class="clearfix">

	<?php include ('../../library/template/admin/adminpanel.php'); ?>
    
    <div id="content" class="clearfix">
    	    	
		<?php mainNav($page); ?>

    	<div id="left" class="clearfix">
    		<div id="left_container">
    			
				<?php subNav($page); ?>

				<?=$message?>

				<h1 class="section">Current Commission Requests</h1>
    					
				    <?=$tablerows?>
				      	
	   		</div>
    	</div>
    	<!-- Right Side Bar Here -->	    	
		<?php include ('../../library/template/admin/footer.php'); ?>
</body>
</html>

<?php

unset ($_SESSION["message"]);

include '../../library/closedb.php'; 

?>

okay add

$result = mysql_query ($result) or die (mysql_error());
$found = mysql_num_rows ($result); //ADD
$tablerows = "FOUND: $found"; //ADD
while($row = mysql_fetch_assoc($result)) 

 

If you get FOUND: 0 then the query is the problem

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.