I have two files which is index.php and upload.php
In index I have a browse button and a submit button. If I click the submit button, it will direct to a new web page and show the uploaded file name and size.
All of this works.
Now I want to show the uploaded file name and size on the same web page as the browse and submit button.
print('<tr><td width=100px>File Name</td><td>File Size</td></tr>');
print('<tr><td>'. $_FILES['uploadedfile']['name'] . '</td><td>'. round($_FILES['uploadedfile']['size']/1024,4) . ' Kb</td></tr>');
I have tried to insert the upload.php code in a new html
<input type=hidden name=MAX_FILE_SIZE value=500000>
<input type=file name=uploadedfile>
<input type=submit name="upload" value=Upload>
and insert the upload.php code right below head
//All the code for upload file including the table containing uploadedfile name and size
What is missing? or are there any better way to do this?