Stephan Liebig
Erfahrenes Mitglied
Dieser fehler kommt bei diesem Code:
Weiß jemand wo mein Fehler liegt?
PHP:
<?php
#db settings
include('config.inc.php');
#connect to database
$conn = mysql_connect("$host","$user","$pass");
if (!$conn) {
die ("Der Verbindungsversuch zur Datenbank ist leider fehlgeschlagen !");
}
#select database sv-airlenbach
mysql_select_db($userdatabase,$conn);
$result = mysql_query("SELECT * FROM vorstand ORDER BY task_id DESC", $conn);
$num_vor = mysql_num_rows($result);
for($i=0;$i<$num_vor;$i++) {
$data = mysql_fetch_array($result);
#check if picture is available
$filename = './images/vorstand/'.$data[picture];
if (file_exists($filename))
{
$picture = $data[picture];
}
else
{
$picture = 'nopic.jpg';
}
#Ausgabe des Vorsatndes
echo '<table width="100%" border="0" cellspacing="0" cellpadding="0">';
echo '<tr>';
echo '<td><img src="./images/vorstand/'.$picture.'"></td>';
echo '<td valign="top">'.$data[nachname].', '.$data[vorname].'<br>'.$data[posten].'<br>Tel.: '.$data[telefon].'<br> Email: '.$data[email].'</td>';
echo '</tr>';
echo '</table>';
echo '<br><br>';
}
#close db-connection
mysql_close($conn);
?>
Weiß jemand wo mein Fehler liegt?