Hi.
I am using the following code to try and enable users to upload an image. For some reason it is not working; I have checked and rechecked the code. I have also looked at the online manuals as well.
Can anyone help me please?
[PHP]
<?php
if (isset($_POST['submit']))
{
$uploaddir ="../recruit/";
$uploadfile=$up loaddir . $_FILES['agy']['nm'];
$agy =$_FILES['agy']['nm'];
if ($agy)
{
move_uploaded_f ile($_FILES['agy']['tmp_nm'], $uploadfile);
}
elseif (empty($agy))
{
$agy='No logo available';
}
}
?>
<form enctype = "multipart/form-data" action = "<?php echo $_SERVER['PHP_SELF']; ?>" method = "post">
<input type = "file" name = "agy" value = ""/>
<br/>
<br/>
<input class = "gobut" type = "submit" name = "submit" value = "upload logo" tabindex = "13"/>
</form>
[/PHP]
I am using the following code to try and enable users to upload an image. For some reason it is not working; I have checked and rechecked the code. I have also looked at the online manuals as well.
Can anyone help me please?
[PHP]
<?php
if (isset($_POST['submit']))
{
$uploaddir ="../recruit/";
$uploadfile=$up loaddir . $_FILES['agy']['nm'];
$agy =$_FILES['agy']['nm'];
if ($agy)
{
move_uploaded_f ile($_FILES['agy']['tmp_nm'], $uploadfile);
}
elseif (empty($agy))
{
$agy='No logo available';
}
}
?>
<form enctype = "multipart/form-data" action = "<?php echo $_SERVER['PHP_SELF']; ?>" method = "post">
<input type = "file" name = "agy" value = ""/>
<br/>
<br/>
<input class = "gobut" type = "submit" name = "submit" value = "upload logo" tabindex = "13"/>
</form>
[/PHP]
Comment