sumfight Posted December 14, 2007 Share Posted December 14, 2007 I wanna take a page like http://www.sumfight.com/v2/skits_/, and make it to where the pictures and text will appear in different spots each time it is loaded. You can see what it looks like, so is that possible through my wordpress software? I mean on the side of the site you can see I have a random quote set up through php and it works, just not sure if I can do it with the main bulk of the page, and if i can do it, would you guys give me a tip on how to do it? Please and thank you . Quote Link to comment https://forums.phpfreaks.com/topic/81708-is-this-possible-to-do/ Share on other sites More sharing options...
roopurt18 Posted December 14, 2007 Share Posted December 14, 2007 Do you mean you want the overall layout to remain constant and just alter the order of the videos and associated text? Or do you want the entire layout to change (i.e. first load the videos are on the left, second load they're on the right)? Quote Link to comment https://forums.phpfreaks.com/topic/81708-is-this-possible-to-do/#findComment-415000 Share on other sites More sharing options...
sumfight Posted December 14, 2007 Author Share Posted December 14, 2007 a guy wrote me a working script, i just can't get the image to display now, other then that everything else works fine, any tips? <?php $host="host"; // Host name $username="username"; // Mysql username $password="password"; // Mysql password $db_name="database name"; // Database name // Connect to server and select databse mysql_connect("$host", "$username", "$password")or die("cannot connect to server"); mysql_select_db("$db_name")or die("cannot select DB"); $sql="SELECT * from images LIMIT 12"; // choose limit of pictues to be displayed $result=mysql_query($sql); ?> <table width="95%" border="0" cellpadding="3" cellspacing="3" style="padding-top:5px"> <tr> <?php $i=13; // always 1 more than limit while($rows=mysql_fetch_array($result)){ $i = $i - 1; if($i % 2 == 0) { ?> </tr> <tr> <?php } ?> <td align="center" valign="top"><table border="0" align="center" > <tr> <td align="center><img src="<?php echo $rows['image']; ?>" alt="<?php echo $rows['name']; ?>" border="0"/></td> </tr> <tr> <td align="center" valign="middle"><a href="<?php echo $rows['link']; ?>"><?php echo $rows['name']; ?></a></td> </tr> </table></td> <td> <?php } ?> </td> </tr> </table> Quote Link to comment https://forums.phpfreaks.com/topic/81708-is-this-possible-to-do/#findComment-415163 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.