shage Posted September 29, 2007 Share Posted September 29, 2007 <?php $val = $_GET['rage']; $tour = $_GET['style']; $vh = $_GET['shage']; include 'connect.php'; $sql = mysql_query("SELECT * FROM sites ORDER BY RAND() LIMIT 4") or die(mysql_error()); while($row = mysql_fetch_array($sql, MYSQL_ASSOC)){ $site .= "<td width='50%'>" . $row['site'] . "</td>"; $text .= "<td width='50%'>" . $row['text'] . "</td>"; $site2 .= "<td>" . $row['site'] . "</td>"; $text2 .= "<td>" . $row['text'] . "</td>"; } ?> <?php if ($vh == "h"): ?> <table border="5" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#808080" width="40%" id="AutoNumber1" bgcolor="#C0C0C0"> <tr> <?php echo $site;?> </tr> <tr> <td><?php echo $text;?></td> </tr> </table> </center> <?php else: ?> <table width="169" border="0"> <tr> <?php echo $site2;?> </tr> <tr> <?php echo $text2;?> </tr> </table> </center> <?php endif; ?> Im trying to echo out 4 random tables from the database, one being horizontal and one being vertical depending on how i call it, this is to pull random products on sidebar and horizontal depending on the page itself. Some reason it only shows horizontal and not vertical I am very new at this stuff so please bear with me Quote Link to comment https://forums.phpfreaks.com/topic/71184-vert-problem/ Share on other sites More sharing options...
marcus Posted September 29, 2007 Share Posted September 29, 2007 Vertical as in: T E X T If that's the case try something like this: <style> .verticaltext { writing-mode: tb-rl; filter: flipv fliph; } </style> <td class="verticaltext">your text here</td> *only works in IE Quote Link to comment https://forums.phpfreaks.com/topic/71184-vert-problem/#findComment-358041 Share on other sites More sharing options...
shage Posted September 29, 2007 Author Share Posted September 29, 2007 the table is split into site and text, the text needs to be under the site but in one html table, when horizontal it does it with tr and td Quote Link to comment https://forums.phpfreaks.com/topic/71184-vert-problem/#findComment-358044 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.