I am trying to show the form only if submit is not set, and if set then upload file and show link to the same page so that a new file could be uploaded again.
It shows the form even after I click on the submit button. I have not added an upload script now.
<body>
<?php
if (isset($_POST['submit']))
{
$output_form == 'no';
echo 'hiiiii';
}
else {
$output_form = 'yes';
}
if($output_form = 'yes')
{
?>
<form enctype="multipart/form-data" action="<?php echo $_SERVER['PHP_SELF']; ?>">
<input type="file" name="uploadpic" />
<input type="submit" value="Upload" name="submit" />
</form>
<?php
}
?>
</body>
It should be