Drop down pour images
Posté : 14 juin 2016, 09:07
Salut je suis encore face a un probleme qui me menace la ma page reste toute blanche je ne pense pas que cela est lie a la connection car j'ai deja examine cela, mais toute proposition serait la bienvenu .
encore une fois de plus avant de pose une question ici, cela veut dire que j'ai d,abord cherche a faire quelque chose et ensuite essaye de voire ce qui ne va pas.
donc en voici mon code et pour cela j'ai cree un tableau
Tableau voire sous ce lien
http://www.bilder-upload.eu/show.php?fi ... 888047.png
php
encore une fois de plus avant de pose une question ici, cela veut dire que j'ai d,abord cherche a faire quelque chose et ensuite essaye de voire ce qui ne va pas.
donc en voici mon code et pour cela j'ai cree un tableau
Tableau voire sous ce lien
http://www.bilder-upload.eu/show.php?fi ... 888047.png
php
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">.
<html>
<head>
<?php
define('DB_HOST', 'localhost');
define('DB_NAME', 'kantteile');
define('DB_USER','root');
define('DB_PASSWORD','');
$con=mysql_connect(DB_HOST,DB_USER,DB_PASSWORD) or die("Failed to connect to MySQL: " . mysql_error());
$db=mysql_select_db(DB_NAME,$con) or die("Failed to connect to MySQL: " . mysql_error());
mysql_query("SELECT * FROM 'bild' WHERE type=''");
return true;
?>
<?php
$type = $_POST['type'];
if(!isset($type) || $type == ""){
$string = "";
$msg = "";
}else{
$string = "WHERE TYPE= '".$type."'";
$msg = $type;
}
?>
<meta http-equi="Content-Type" content="test/html"; charset="utf-8"/>
<title>liste kantteile</title>
</head>
<body>
<div id="conteudo-master">
<div id ="conteudo">
<h1>LISTE KANTTEILE</h1>
<form name="formCombo" action="" method="post" enctype="multipart/form-data">
<select name="TYPE">
<option value="" selected="selected">Select TYPE</option>
<?php
$type = $connect->select("SELECT TYPE FROM kantteile GROUP BY type");
while($obj = mysql_fetch_array($type)){
echo '<option value="'.$obj['TYPE'].'">'.$obj['TYPE'].'</option>';
}
?>
</select>
<input type="submit" name="submit" value=filter>
</form>
</div>
<?php
if(isset($msg));
?>
<div class="tag">
<?= $msg;?>
</div>
<table cellpadding="8" cellspacing="10" border="0" width="100%">
<tr>
<?php
$Hori = 3;
$res = $connect->select("SELECT * FROM kantteile $string");
$register = mysql_fetch_array($res);
$i = 1;
while($list = mysql_fetch_array($res)){
if($i < $Hori){
echo '
<td align="center" valign="top" bgcolor="#FFFFFF">'.$i.'
<img src="'.$list['ordner'].$list['bild'].'" width="200" height="150" alt=""/><br/>
Beschreibung: <strong>'.$list['beschreibung'].'</strong><br />
Art: <strong>'.number_format($list['TYPE'], 2, ",", ".").'</strong>
</td>
';
}elseif($i = $Hori){
echo'
<td align="center" valign="top" bgcolor="#FFFFFF">'.$i.'
<img src="'.$list['ordner'].$list['bild'].'" width="200" height="150" alt=""/><br/>
Beschreibung: <strong>'.$list['beschreibung'].'</strong><br />
Art: <strong>'.number_format($list['TYPE'], 2,",", ".").'</strong>
</td>
</tr>
</tr>
';
$i = 0;
}
$i++;
}
?>
</tr>
</table>
</div>
</div>
</body>
CSS
<style type="text/css">
body{margin:0px; background-color:#cccccc}
#conteudo-master(width:100%; margin:0px; padding:0px)
#conteudo{width:960px; display:block; margin:25px auto; padding:15px; background-color:#ebebeb; position:relative; font-family:arial,
Helvetica, sans-serif}
#conteudo h1(font-size:18px; color:#333333; display:block; border-bottom:double 3px #999999; padding-bottom:$px}
.menu{ display:block; margin:0px; padding:5px}
.tag{
font-size:10px;
color:#FFFFFF;
display:inline;
padding:5px;
padding:5px;
background-color:#a6bcd7;
}
</style>