ok this one is tricky. cannot for the life of see what i forgot or added - whatever the case maybe. the error is an odd one. it says unexpected $ in line 143. but line 143 is the last line of the file namely </html> so if figur it must be in this section of the code can anyone see it:
<html>
<head>
<title>File uploading and displaying them</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<form action="<?=$_SERVER[PHP_SELF']?>" metod="POST" enctype="multipart/form-data" name="uploadform">
Image:<input type="file" name=imageupload"><br>
Caption: <input type="text" name="caption">
</form>
<br>
<p>
Here's a list of all the images uploaded:
<?php
$query="SELECT * from images ORDER by date_auto DESC"; // newest reviews at top
$data=send_query($query, $link);
echo '<ol>'; // start ordered list
for ($i=0;$i < mysql_num_rows ($data);$i++)
{
//get all values needed for output
/*
function used : mysql_result (resource result, int row, mixed field)
mysql_result() returns the contents of one cell from a mysql result set.
The field argument can be fields offset, or the fields name, or the fields
tabel dot field name (tablename.fieldname) .
*/
$img_name = mysql_result($data, $i, "image_name" ) ;
$img_caption =mysql_result($data, $i, "caption") ;
$time = mysql_result($data, $i, "date_auto");
//if there are any newlines in the caption then convert these to <br> tags
$img_caption = nl2br ($img_caption);
// Create the output.
// OUTPUT: 1. link : <date><newline>bulletpoint>caption
// DATE FORMAT: Wed 19/02/03 12:53:16 AM format is created by date()
echo '<li><a href ="javascript:showimage('.$file_dir + img_name.') ">'.$img_name. '</a> : added
<?= data("D d/m/y h:i:s A", $time)?>
<ul>
<il><em>'.img_caption.'</em></il>
</ul>
<il><br>';
}
echo '</ol>; // end ordered list
?>
</p>
</body>
</html>