I need to take an image as user input on the uploaduser.php page and then display the uploaded image on the home.php page. How can I do that?
Uploaduser.php:
<body>
<nav>
<a href='home.php'>Home</a>
<a href='/AMU WALL/main/uploaduser.php'>Upload</a>
<a href='/AMU WALL/logout.php'>Logout</a>
<div class='animation start-home'>
</div> <div class="animation start-home">
</div>
</nav>
</body>
</html>
<section class="form login">
<header> Upload your Photo </header>
<form action="home.php" method="POST" enctype='multipart/form-data'>
<div class="error-text"></div>
<div class="field input">
<label>Name</label>
<input type="name" name="name" placeholder="Enter Your Name" required>
<small></small>
</div>
<div class="field input">
<label>Your Message</label>
<input type="text" name="message" placeholder="Enter Message" required>
</div>
<div class="field input">
<label>Your Image</label>
<input type='file' name='userimage' style="border:none;" accept='image/*' required>
</div>
<div class="field button">
<input type="submit" name="submit" value="Upload">
</div>
</form>
</section>
</div>
I tried using php code for it but it did not work.