<?
if ($guide1_name != "") {
@copy("$guide1", "D:/webspace/theheadgamster/gamesteronline.com/www/uploads/$guide1_name")
or die("Couldn't copy the file.");
}
if(file_exists("D:/webspace/theheadgamster/gamesteronline.com/www/uploads/$guide1_name")) {
for($i=0;;$i++) {
$new_filename=$guide1_name."_$i";
if(!file_exists("D:/webspace/theheadgamster/gamesteronline.com/www/uploads/$new_filename")) break;
}
} else {
die("No input file specified");
}
?>
<HEAD>
<TITLE>Successful File Uplaod</TITLE>
</HEAD>
<BODY>
<P>You sent: <? echo "$guide1_name"; ?>, a <? echo "$guide1_size"; ?> byte file with a mime type of <? echo "$guide1_type"; ?>.</P>
</BODY>
i put that new code in just now, and the code still works, but it just doesn't add the _1 etc. to an existing file, it still overwrites it...
could you fix the PHP for me and then post it? I am new at PHP, and started in my free time like 4 days ago...