Here we go:
In the calling 'page' it says:
<FORM ENCTYPE="multipart/form-data" ACTION="picture1.php3?lastid" METHOD=POST target="mainframe">
<INPUT TYPE="hidden" name="MAX_FILE_SIZE" value="50000">
Send this file: <INPUT NAME="userfile" TYPE="file">
<INPUT TYPE="submit" VALUE="Send File">
<input type="hidden" name="lastid" value="<?php echo $lastid ?>">
</FORM>
Then the file (in this case picture1.php3) has the following code
<head>
<title>Picture 1 Upload</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF">
<form name="form1" >
<?php
if ($userfile_size==0) {
?>
<table width="100%" dwcopytype="CopyTableRow">
<tr>
<td><font face="Arial, Helvetica, sans-serif">Your pictures file size is
too big. The limit is 50K per picture.</font></td>
</tr>
</table>
<?php
}
else
{
if (file_exists('directorypath/'.$userfile_name))
{
?>
<table width="100%" dwcopytype="CopyTableRow">
<tr>
<td><font face="Arial, Helvetica, sans-serif">Another picture using that
name exists already. Please give your image another name.</font></td>
</tr>
</table>
<?php
}
else
{
copy($userfile,'directorypath/'.$userfile_name);
unlink($userfile);
$db = mysql_connect("ourhost.net", "dbname","dbpassword");
mysql_select_db("dbname",$db);
$sql = "UPDATE TABLENAME SET PICTURE1='$userfile_name' WHERE ORGID=$lastid";
$result = mysql_query($sql);
?>
<table width="100%">
<tr>
<td>
<p><font face="Arial, Helvetica, sans-serif">File uploaded:</font></p>
<p><font face="Arial, Helvetica, sans-serif">Click Refresh on your Organization's
Details to see the new picture</font></p>
</td>
</tr>
</table>
<input type="hidden" name="lastid" value="<?php echo "$lastid" ?>">
</form>
<?php
}
}
?>
</body>
and that all worked fine for me.
Regards
Elizabeth