<?php
include("header.php");
$link = mysqli_connect("localhost", "root", "", "shop");
if (mysqli_connect_errno()) {
	exit("خطایی با این شرح رخ داداه است" . mysqli_connect_error());
}


$query = "SELECT * FROM mbl";
$result = mysqli_query($link, $query);


while ($row = mysqli_fetch_array($result)) {
?>
	<table style="width: 100%" ; border="3px" ;>
		<tr>

			<td style="border-style: dotted dashed; vertical-align: top; width: 33%; font-size: 18px;" dir="rtl">
				<h4 style="color: blue; text-align: center"> <span style="color: hsla(0,0%,4%,1)">نام مبل</span> : <?php echo ($row['mbl_name']); ?></h4>

				<a href="mbl_detail.php?id=<?php echo ($row['mbl_cod']) ?>" id="<?php echo ($row['mbl_cod']); ?>">
					<img style="float: left" src="img/<?php echo ($row['mbl_img']); ?>" width="509" height="303" alt="j" />
				</a>
				<br />
				جنس مبل : <strong><?php echo ($row['jens']); ?> &nbsp;
				</strong><br />
				<br />
				قیمت مبل 7 نفره : <strong><?php echo ($row['mbl_price']); ?> &nbsp; ریال
				</strong><br />
				<p>&nbsp;</p>

				تعداد مبل ها برای سفارش <span style="color: hsla(308,100%,50%,1)">:</span> <span style="color: hsla(119,100%,46%,1); font-size: 24px;">نامحدود</span><br />

				توضیحات : <span style="color: darkgreen" ;><?php echo (substr($row['mbl_textarea'], 0, 120)); ?>...</span>

				<br /><br />
				<b><a href="mbl_detail.php?id=<?php echo ($row['mbl_cod']) ?>" id="<?php echo ($row['mbl_cod']); ?>" style="text-decoration: none;">توضیحات کامل و خرید</a></b>





			</td>



		</tr>


	<?php
}
	?>
	</table>