Jump to content

Could someone check this for the error?


Recommended Posts

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

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.