Ross
Ross

Reputation: 49

how to return to upload form with image now present?

I have created a form that allows users to upload. I have the "action" as "action: upload.php" and the code runs fine.

However after the upload the browser displays the output of upload.php as expected. What do I need to add to upload.php so it automatically returns back to the form where I can then show the image recently uploaded there also?

Upvotes: 0

Views: 60

Answers (1)

cipher
cipher

Reputation: 2484

USE: header("location:yourpage.php") in your upload.php to redirect to yourpage.php where yourpage.php may be the page where you want to show images

If you are experiencing problems on that Use:

ob_start();
header("location:yourpage.php")

That should Help

Upvotes: 1

Related Questions