Guest_imported
New member
- Jan 1, 1970
- 0
This script will read 4 pictures from a MySql-Database. When I`m click on a picture, I only see a
blanc site. How is the bug? (Sorry for my english, I am from germany).
<?php
require("config.php"
?>
<HTML>
<HEAD>
</HEAD>
<BODY>
<?php
mysql_connect("$host","$user","$pass"
mysql_select_db("$database"
$result = mysql_query("select * from products where(objekt_nr = '$objekt_nr') ORDER BY
'objekt_nr'"
$i = 0;
while($row = mysql_fetch_row($result)) {
$bild = array(1 => "images/$row[26]","images/$row[27]","images/$row[28]","images/$row[29]"
$thumbs = array(1 => "images/$row[26]","images/$row[27]","images/$row[28]","images/$row[29]"
if (!$gross) {
$gross = 1;
$klein1 = 2;
$klein2 = 3;
$klein3 = 4;
$klein4 = 1; }
echo "<Table border=1>
<TR><TD align=\"left\" valign=\"top\">
<img src=\"$bild[$gross]\" width=250><BR>
<a href=\"$PHPSELF?klein1=$gross&gross=$klein1&klein2=$klein2&klein3=$klein3\"><img
src=\"$thumbs[$klein1]\" border=0 width=80></a>
<a href=\"$PHPSELF?klein2=$gross&gross=$klein2&klein1=$klein1&klein3=$klein3\"><img
src=\"$thumbs[$klein2] \" border=0 width=80></a>
<a href=\"$PHPSELF?klein3=$gross&gross=$klein3&klein1=$klein1&klein2=$klein2\"><img
src=\"$thumbs[$klein3]\" border=0 width=80></a>
<P></table>";
}
?>
</BODY>
</HTML>
blanc site. How is the bug? (Sorry for my english, I am from germany).
<?php
require("config.php"
?>
<HTML>
<HEAD>
</HEAD>
<BODY>
<?php
mysql_connect("$host","$user","$pass"
mysql_select_db("$database"
$result = mysql_query("select * from products where(objekt_nr = '$objekt_nr') ORDER BY
'objekt_nr'"
$i = 0;
while($row = mysql_fetch_row($result)) {
$bild = array(1 => "images/$row[26]","images/$row[27]","images/$row[28]","images/$row[29]"
$thumbs = array(1 => "images/$row[26]","images/$row[27]","images/$row[28]","images/$row[29]"
if (!$gross) {
$gross = 1;
$klein1 = 2;
$klein2 = 3;
$klein3 = 4;
$klein4 = 1; }
echo "<Table border=1>
<TR><TD align=\"left\" valign=\"top\">
<img src=\"$bild[$gross]\" width=250><BR>
<a href=\"$PHPSELF?klein1=$gross&gross=$klein1&klein2=$klein2&klein3=$klein3\"><img
src=\"$thumbs[$klein1]\" border=0 width=80></a>
<a href=\"$PHPSELF?klein2=$gross&gross=$klein2&klein1=$klein1&klein3=$klein3\"><img
src=\"$thumbs[$klein2] \" border=0 width=80></a>
<a href=\"$PHPSELF?klein3=$gross&gross=$klein3&klein1=$klein1&klein2=$klein2\"><img
src=\"$thumbs[$klein3]\" border=0 width=80></a>
<P></table>";
}
?>
</BODY>
</HTML>