Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $servername = "localhost";
- $username = "";
- $password = "";
- $dbname = "";
- // Create connection
- $conn = new mysqli($servername, $username, $password, $dbname);
- // Check connection
- if ($conn->connect_error) {
- die("Connection failed: " . $conn->connect_error);
- }
- $imagensend = "";
- $urlgensend = "";
- $sql = "select * FROM `isc_products` P inner join `isc_product_images` I on I.imageprodid=P.productid WHERE P.productid > 0 ORDER BY RAND() DESC LIMIT 8 ";
- $result = $conn->query($sql);
- while($row = $result->fetch_assoc()) {
- if($contaopclp && ($contaopclp%2 == 0))
- echo "</div></td></tr><tr>";
- $urlprodname = str_replace(" ", "-", $row['prodname']);
- ?>
- <table width="1%" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td width="10%" align="left" valign="top"><table width="1%" border="0" align="center" cellpadding="0" cellspacing="0">
- <tr>
- <td width="1%" align="center"><a href="<?=$urlgensend?><?=$urlprodname?>.html">
- <img src='<?=$imagensend?><?=$row["imagefilethumb"]?>'/> </a></td>
- </tr>
- </table></td>
- </tr>
- <tr>
- <td align="center" valign="top"><h6><? echo $row['prodname'];?></h6></td>
- <td valign="top"><img src="img/z_transp.gif" width="5" height="5" align="absmiddle"/></td>
- </tr>
- </table>
- <? $contaopclp++;?>
- <? }?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement