Hey all
I made a lil upload script which worked fine no problems at all, i wanted to use it on another site so i copied the code and everything over and now it keeps saying that it isnt picking up the file i tell it to upload
upload script
$webServer="/var/www/html/dev/uploads/";
$heading = 'Final Check';
if ($_POST['submit1'])
{
if($img1_name!=""){
@copy("$img1","$webServer$img1_name") or die("Couldn't copy the file");
}
else{
die("No input file specified!$img1_name");
}
$uplink = 'http://devserver/dev/uploads/'.$img1_name;
form
<form method=post action="<?php echo $PHP_SELF.'?action=hwstage2';?>" enctype="multipart/form-data">
<table bgcolor='#ffffff' cellpadding = 6 cellspacing = 0 border = 0>
<tr>
<th colspan = 2 bgcolor = '#ffffff'>
<?php echo $heading?>
</th>
</tr>
<tr>
<td>Teacher Name:</td>
<td><textarea name=teacher rows=1 cols=20><?php echo $teacher?></textarea></td>
</tr>
<tr>
<td>Year Group:</td>
<td><textarea name=year rows=1 cols=20><?php echo $year ?></textarea></td>
</tr>
<tr>
<td>Subject:</td>
<td><textarea name=subject rows=1 cols=20><?php echo $subject?></textarea></td>
</tr>
<br>
<tr>
<td>Homework Text:</td>
<td><textarea name=text rows=10 cols=70><?php echo $text?></textarea></td>
</tr>
<tr>
<td>Due Date:</td>
<td><textarea name=datedue rows=1 cols=20><?php echo $datedue?></textarea></td>
</tr>
<tr>
<td>Class Name:</td>
<td><textarea name=classname rows=1 cols=20><?php echo $classname?></textarea></td>
</tr>
<tr>
<td>File to Upload:</td>
<td><input type=file name=img1 size=30></td>
</tr>
<tr>
<td><center><input type = submit name = submit1 value = 'Upload File'></center></td>
<td><center><input type = submit name = submit2 value = 'Add Homework Now'></center></td>
</tr>
</center>
</form>
</table>
is there anything there that would stop this from working?
many thanks