thanks but i'd like to work out what they are doing exactly.
on another similar page the image is called like this:
<img src="../prospectusimage.php?pid=<?php echo $pid ?>">
My image is added like this: (snippet of code taken from original code):
if (is_uploaded_file($_FILES['nw_image']['tmp_name'])){
$fn = $_FILES['nw_image']['tmp_name'];
$fp=fopen($fn,"rb");
$fs=filesize($fn);
$image=fread($fp,$fs);
fclose($fp);
}
$sql = "INSERT INTO `newsbak` SET".
" nw_college = ".$college['college_id'].
", nw_title = '".addslashes(trim($_POST['nw_title']))."'".
", nw_text = '".addslashes(trim($_POST['nw_text']))."'".
", nw_date = now()".
", nw_image = '".addslashes($image)."'";
i think the mod rewrite has something to do with how this works, this is the line i think matters:
RewriteRule newsimage_([.]+).jpg newsimage.php?nwid=$1