Jump to content

[SOLVED] no output


bigrossco

Recommended Posts

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_post
FROM clients c, client_invoices ci
WHERE 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">
  <?php
if (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

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.