PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : fehlersuche


pennywise81
02.07.2003, 12:21:26
Kann mir einer sagen was da falsch ist? krieg keine ausgabe...
<?php
mysql_connect($host,$username,$password);
mysql_select_db($database);
$result = mysql_query("SELECT id, datei, tn FROM fotos WHERE gallerie = $_GET[gallery]");
while($row = mysql_fetch_array($result)) {
echo "<a href="fotos.php?action=view&pic=".$row["id"].""><img src="fotos/".$_GET["gallery"]."/".$row["tn"].""></a><br>";
}
?>

chris17
02.07.2003, 12:28:48
Hi,
probier's mal so...
$result = mysql_query("SELECT id, datei, tn FROM fotos WHERE gallerie = '".$_GET['gallery']."' ");

pennywise81
02.07.2003, 12:34:21
erstmal danke. hab aber immer noch keine ausgabe. hab's jetzt so:
<?php
mysql_connect($host,$username,$password);
mysql_select_db($database);
$result = mysql_query("SELECT id, datei, tn FROM fotos WHERE gallerie = '".$_GET['gallery']."' ");
while($row = mysql_fetch_array($result)) {
echo "<a href="fotos.php?action=view&pic=";
echo $row["id"];
echo "><img src="fotos/";
echo $_GET["gallery"];
echo "/";
echo $row["tn"];
echo ""></a><br>";
}
?>

chris17
02.07.2003, 13:01:03
In der DB wird ja was drinstehen.
Gibt
echo $_GET['gallery'];was aus?

pennywise81
02.07.2003, 13:06:44
is schon gut. hatte mich vertippt.