bigrossco Posted January 9, 2007 Share Posted January 9, 2007 can any one help me with the code below, it dosent show any output on my php page:[code] <?php $host = "$lang_dbhost"; $user = "$lang_dbuser"; $pass = "$lang_dbpass"; $db = "$lang_dbase"; // open connection $connection = mysql_connect($host, $user, $pass) or die ("Unable to connect!"); // select database mysql_select_db($db) or die ("Unable to select database!");$query = "SELECT c.contact_name, c.bus_name, c.bus_street, c.bus_add2, c.bus_town, c.bus_postFROM clients c, client_invoices ciWHERE ci.invo_no = '".$_SESSION["username"]."'AND ci.cust_id = c.id"; // execute query $result = mysql_query($query) or die ("Error in query: $query. ".mysql_error());?><form action="<?=$_SERVER['PHP_SELF']?>" method="post"> <?phpif (mysql_num_rows($result) > 0) { echo"<table border = 0>"; echo"<tr>"; while($row = mysql_fetch_row($result)){ echo"<tr>";echo "<td>".$row[0]."</td>";echo"</tr>";echo "<td>".$row[1]."</td>";echo"</tr>";echo "<td>".$row[2]."</td>";echo"</tr>";echo "<td>".$row[3]."</td>";echo"</tr>";echo "<td>".$row[4]."</td>";echo"</tr>";echo "<td>".$row[5]."</td>";echo"</tr>";echo "<td>".$row[6]."</td>";echo"</tr>"; } }?>[/code] Link to comment https://forums.phpfreaks.com/topic/33453-solved-no-output/ Share on other sites More sharing options...
bigrossco Posted January 9, 2007 Author Share Posted January 9, 2007 sorry my fault fixed it was correct I just had the wrong session name Link to comment https://forums.phpfreaks.com/topic/33453-solved-no-output/#findComment-156590 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.