Hi all, thanks for all your help last time.. Unfortunately I couldn't get
any of the suggestions to work and because of time constraints I had to go
to something that I knew worked... But I'd like to revisit this because I
really want this option to run locally on the os x server...
Basically I have this string of code:
<?php
if($file_name !="")
{
copy ("$file", "/Library/WebServer/Documents/olcg/admin/$file_name")
or die("Could not copy file");
}
else { die("No file specified"); }
// If a ITL has been submitted,
// add it to the database.
if (@mysql_query($sql)) {
echo('<p><b><center>Your Tile Ad has been uploaded and
updated.</center></b></p>');
} else {
echo('<p>Error adding submitted ITL: ' .
mysql_error() . '</p>');
}
?>
<strong>Your Tile Graphic Has Been uploaded. </strong>
<ul>
<li>Sent: <?php echo "$file_name"; ?>
<li>Size: <?php echo "$file_size"; ?> bytes
<li>Type: <?php echo "$file_type"; ?>
</ul>
<p><img src="<?php echo "$file_name" ?>"> </p>
I keep getting the error Could not copy file... When I look at the error log
it tells me:
[Thu Feb 3 09:57:22 2005] [error] PHP Notice: Undefined variable:
file_name in
/Library/WebServer/Documents/olcg/admin/edit/tilegraphicsubmit.php on line
32
When I move this to a linux server running php 4 and mysql (the exact same
thing this server is running) it works great. Any help would be appreciated
in helping me figure out why this isn't working.