having a problem with a section of me code. anyone see what and where i am doing something wrong? or if i am missing something? for some reason my pop-up aint popping! this is not the entire code just the last section. i belive this is the section where i am either doing something wrong or missing something.
<script language="javascript">
<!--
function showimage(image_loc)
{
window.open(image_loc, 'mainpage','toolbar=yes, location=no, directions=no, status=no,menubar=yes,scrollbars=yes,resizable=no, width=800, height=650');
}
//-->
</script>
<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'] ?>" method="POST" enctype="multipart/form-data" name="uploadform">
Image:<input type="file" name="imageupload"><br><br>
Caption: <input type="text" name="caption"><br><br>
<input type="submit" name="submit" value="Send Image">
</form>
<br>
<p>
Here's a list of all the images uploaded:
<?php
echo 'File Dir: '.$file_dir;
$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, "img_name" ) ;
$img_caption =mysql_result($data, $i, "img_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 : '. date("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>