Hi All,
I have a problem i dont know how to fix. Hopefully you guys/girls can help me with it.
I have an upload page that people can use to upload photos. Problem is, when you whack the upload button on the first page, it runs a php script which uploads the photo - but it seems to run down the script untill it gets to the point of the exec'ing and the user seees a blank page for a while untill the picutre is uploaded.
This has me somewhat baffled cause it never used to happen, and i cant see anything ive changed for it to do so.
Posted below is the script i am using
<head>
<STYLE>UNKNOWN {
TEXT-DECORATION: none
}
A:hover {
CURSOR: crosshair; COLOR: white; TEXT-DECORATION: none; COLOR: white; BACKGROUND-COLOR: #0080FF;}
</STYLE>
<title>Thankyou!</title>
</head>
<body bgcolor="#00003E" link="#FFFFFF" vlink="#FFFFFF" leftmargin="0">
<?
include "../inc/top.php";
?>
<div align="center">
<table border="0" width="100%">
<tr>
<td width=20% valign="top" align="left">
<?
include "../inc/left.php";
?>
</td>
<td width="60%" align="center" valign="top">
<font color="#FFFFFF" face="Arial" size="2"><br>
<?
include "../inc/header.inc";
include "../inc/settings.inc";
if ($image_name != "") {
copy("$image", "temp/original/$image_name") or die ("Couldn't copy the file.");
exec("/usr/bin/convert -geometry 200 temp/original/$image_name temp/thumbs/$image_name", $error);
exec("/usr/bin/convert -quality 80 temp/original/$image_name temp/big/$image_name", $error);
} else {
die("You forgot to add a filename. Please click the back button and try again.");
}
$insert_data = "INSERT INTO temp (image_name, image, name, email, country, airfield, rego, remarks, airline, date, month, year) VALUES ('$image_name', 'processed/big/$image_name', '$name', '$email', '$country', '$airfield', '$rego', '$remarks', '$airline', '$date', '$month', '$year')";
mysql_query($insert_data) or die("Couldn't insert data.");
$msg = "uploaded!!\n\n";
$msg .= "Photographer:\t$name\n";
$msg .= "Sender E-Mail:\t$email\n";
$msg .= "Airline:\t$airline\n";
$msg .="Country:\t$country\n";
$msg .= "Registration:\t$rego\n";
$msg .= "Remarks:\t$remarks\n";
$recipient = "my@email.address";
$subject = "File $image_name Uploaded!!";
$mailheaders = "From: Web Site Name<> \n";
$mailheaders .= "Reply-To: $email\n\n";
mail($recipient, $subject, $msg, $mailheaders);
?>
<font face="Arial" size="2" color="white">Thank you for uploading your photo to us. As soon
as we have time we will get round to processing it for you<br><br>Click <a href="">HERE</a>
to add another photo</font>
</td>
<td width=20%>
</td>
</tr>
</table>
</div>
<?
include "../inc/footer.inc";
?>
</body>
the actual link to the website is:
http://www.rwy34.com:81/upload
i would be very appreciative if anyone has any solutions as to why this is happening and a direction in how to fix it.
Regards
Dave