I have a PHP file that looks somewhat like this:
<!DOCTYPE html>
<html>
<head>
<title>XML Converter</title>
</head>
<body>
<div class="jumbotron text-center">
<form action="upload.php" method="POST" enctype="multipart/form-data">
<h1 for="file">Choose your .zip file:</h1> <br />
<input class="btn" type="file" name="file"/>
<button class="btn btn-success" type="submit" name="submit">Upload</button>
</form>
</div>
</body>
</html>
The <form action="upload.php"> line references another PHP file that is in this form:
<?php
?>
<!DOCTYPE HTML>
<html>
....
</html>
How do I make the action="" such that the webpage displays the second PHP file's (upload.php) HTML?
upload.phphtml in first php file ?actionattribute. It sends the user to that page and whatever is there is executed.if(isset($_FILES['file'])if its true then show code of upload.php else default form.