Thanks. I use the first one, it works.
if I add another download button, where I only wanted to download the uploaded file.
I try in the sequence
echo"<input type=file name=uploadedfile onchange=this.form.submit()>";
//the process for upload
echo"<form action='' method=POST><input type=submit value=Download name=download></form>";
//the process for download
It works if I use it separately.
I also attempt to insert the download process in the upload process using if statement
//if upload successful
//download process is next using isset to check if download is click
However, this method not working.
How can I tell user that download only works if I already upload the file?