Forum Moderators: coopster
I didnt fully made this,i had some help...
this is a simple webcam script and like to extend it a bit..
at this moment it pulls the stored cams/images from the db but in 1 line,vertical.
so how or what should i change to put 2 images side by side like :
cam1 cam2
cam3 cam4
cam5 cam6
etc......?
include("include/config.php");
$result = mysql_query("SELECT * FROM rocam") or die(mysql_error());
while( $row = mysql_fetch_array( $result ) ) {
$image = $row['cam'];
$image1 = "<a href=\"#\" onClick=\"chw=window.open('$image','NewWindow','resizable=no,scrollbars=yes,status=no,width=320,height=240'); if (chw!= null) chw.focus(); return false\"><img src=\"$image\" border=\"0\" width=\"200\" height=\"150\"><a/>";
echo "<center>";
echo $image1;
echo "<br>";
echo "<b>Description: ".$row['des'];
echo "</b>";
echo "</center>";
}
/////////////
Table sample....
CREATE TABLE `rocam` (
`number` int(11) NOT NULL auto_increment,
`name` text NOT NULL,
`website` text NOT NULL,
`cam` longtext NOT NULL,
`des` longtext NOT NULL,
PRIMARY KEY (`number`)
) TYPE=MyISAM AUTO_INCREMENT=1;
build your images into a table and that will fix it
you could try some of this code, it will work, but you will have to weave it into your loop
Create a Dynamic Table from mysql result [webmasterworld.com] msg#1300710