|
Posted by Fire Juggler on 07/11/05 10:51
Hi guys,
On my site, the members can upload photos to a selected gallery, the photos
will go into the correct folder depending what gallery they click.
This all works ok, accept wen it causes an error, like the file exists or
not enough data has been entered. It is then redirected to the addphotos
page, but this time it loses which folder it should go into.
addphotos2.php
$table=$_GET[gal];
$folder=$_GET[folder];
echo $error; ?>
<form action="connectphotos.php" method="post"
enctype="multipart/form-data">
File:<br>
<input type="file" name="imagefile" size="30"><br>
Title:<br>
<input type="text" name="title" size="50" maxlength="100"><br>
Comment:<br>
<input type="text" name="comment" size="50" maxlength="200"><br>
<input type="hidden" name="table" value="<?php echo $table ?>">
<input type="hidden" name="folder" value="<?php echo $folder ?>">
<p>
<input type="submit" value="Add Photo To <?php echo $folder?>"
name="submit"> Please click only once, this may take a while.
</form>
connectphotos.php
if
(file_exists("/usr/local/psa/home/vhosts/x-tractband.co.uk/httpdocs/x-tract/
photos/".$folder."/".$_FILES['imagefile']['name']))
{
$error= "<font face=\"Arial\" color=\"Yellow\"><strong>File with name
(".$_FILES["imagefile"]["name"] .") already exists</strong></font><br> ";
include 'addphoto2.php';
}
how do i get the data sent by the form in the 1st place, to see be available
when the error occurs.
Hope fully you understand what i mean.
Thanks
--
Kathryn (Fire Juggler)
http://www.firejugglers.34sp.com
http://www.cornwalljugglers.co.uk
[Back to original message]
|