<?php
function getrecords(){
$sql = 'SELECT * FROM `foto` ';
echo '<br>';
$db = mysql_pconnect('localhost');
if (!$db) {
echo 'Fout: kreeg geen verbinding met de server.<br>';
echo 'MySQL retouneerde: ' . mysql_error();
exit;
}
mysql_select_db('foto');
$result = mysql_query($sql);
if (!$result) {
echo 'error: SQL_error.' . mysql_error();
exit;
}
return $result;
}
$result = getrecords();
$num_results = mysql_num_rows($result);
echo '<table border=7 bordercolordark="#330033" bordercolorlight="#3300CC" bordercolor="#990000">';
for ($i=0; $i < $num_results; $i++) {
$row = mysql_fetch_array($result);
$datepicture = $row['datepicture'];
$resolutie = $row['resolution'];
$location = $row['location'];
echo '<TR><TD>';
echo '<a href="file:///'.$location.'">'.'<img src="file:///'.$location.'" width="150" height="150">';
echo '</td><td>';
echo '<strong>Date: '.$datepicture.'</strong><br>';
echo 'Resolution photo: '.$resolution .'<br>';
echo 'Location: '.$location .'<br>';
echo '</td>'."\n";
}
echo '</table>';
?>
why can't I open the hyperlink and why can I see the image??
Ralph