englishcodemonkey Posted June 24, 2008 Share Posted June 24, 2008 When i run this code nothing shows in the table...Well i guess the table doesn't even show up! <?php require_once('conn.php'); $hosta = $_REQUEST['hosta']; $hosta1 = $_REQUEST['hosta']; $q = "SELECT hybridizer, size, price, description from hostajess where hosta_name='$hosta'"; $r = @mysqli_query ($dbc, $q); if ($r) { echo ' <table align="center" cellspacing="3" cellpadding="3" width="75%"> <tr> <td align="left" width="33.3%">Hybridizer</td> <td align="left" width="33.3%">Size</td> <td align="left" >Price</td> </tr>'; while ($row = mysqli_fetch_array($r,MYSQLI_ASSOC)) { echo ' <tr> <td align="left">' .$row['hybridizer'] . '</td> <td align="left">' .$row['size'] . '</td> <td align="left">' .$row['price']. '</td> </tr>'; } } echo '</table>'; $q = "SELECT description from hostajess where hosta_name='$hosta1'"; $r = mysqli_query ($dbc, $q); if ($r) { echo ' <table align="center" cellspacing="3" cellpadding="3" width="75%"> <tr> <td align="left">Description</td> </tr>'; while ($row = mysqli_fetch_array($r,MYSQLI_ASSOC)) { echo ' <tr> <td align="justify">' .$row['description'] . '</td> </tr>'; } } echo '</table>'; mysqli_close($dbc); ?> This is really frustrating me! thanks for all your help! Link to comment https://forums.phpfreaks.com/topic/111596-could-someone-check-this-for-the-error/ Share on other sites More sharing options...
tpimental Posted June 24, 2008 Share Posted June 24, 2008 If the table doesn't appear then there's something wrong with your SQL query or connection. We'd probably need more info then to help you out. Link to comment https://forums.phpfreaks.com/topic/111596-could-someone-check-this-for-the-error/#findComment-572823 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.