Sir I have these codes
[PHP] <form name="form1" action="<?php $_PHP_SELF ?>" method="post" enctype="multipart/form-data">
<p<Photo</p>
<p><input type="file" name="file" id="file" value="<?php echo $myphoto; ?>"></p>
<p><input type="submit" value="photo" name="save"></p>
</form>[/PHP]
and these are codes for submit button
[PHP]if(isset($_POST['save']))
{
if(isset($_FILES["file"])){
$myphoto=$_FILES["file"]["name"];
echo $myphoto;
}else{
echo 'Error';
}
} [/PHP]
When I press save button the it shows the selected name properly,
But it immediately make file input blank like this
Why php echo is not working in this line?
[PHP] <p><input type="file" name="file" id="file" value="<?php echo $myphoto; ?>"></p>[/PHP]
File name must remain appear after echo.
Please help