Uploading files problem
| From: | Ian Grant | Date: | Wed, 22 Aug 2001 16:45:10 +0000 |
| Subject: | Uploading files problem | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-11667@lists.php.net to get a copy of this message | ||
Hi,
I have this code after a user submits a form with name, description and
image file upload fields:
images/people/preview is simply a unix link to /tmp/phptempimg-ian.grant
The problem is, when this script is run, the image show is that from the
previous operation. If you refresh the page, the correct image is displayed.
How can I fix this without refreshing the page?
--
if (is_uploaded_file($picture)) {
rename($picture, "/tmp/phptempimg-ian.grant");
}
if ($picture!="none")
$picture="/tmp/phptempimg-ian.grant";$picture_src="images/people/preview"; }
else { $picture_src="images/people/none.gif"; }
echo "You are about to add the following member profile to the team
profiles database:<br><br>\n";
echo "<b>Name:</b> $name<br>\n";
echo "<b>Description:</b> $desc<br>\n";
echo "<b>Picture:</b> <img src=\"$picture_src\"
alt=\"$name\"
width=\"110\" height=\"121\"><br>\n";
--