rubing Posted May 20, 2008 Share Posted May 20, 2008 I must be overlooking something very simple here. On my html page I am letting the user select a file to upload. This file is submitted to my php script, where its temporary filename is assigned to a variable: $lines = file($_FILES['uploaded_file']['tmp_name']); This page shows the user what his submission looks like. If the user approves of the submission they click the submit button as follows: <form action="band_ins2.php" method="post"> echo "<input type='hidden' name='bands' value='$lines' />"; <input type="submit" value="Approve" /> </form> Unfortunately, the submitted value of $lines is coming up as Array, rather than the filename. Link to comment https://forums.phpfreaks.com/topic/106401-uploaded-file-missing-filename/ Share on other sites More sharing options...
PFMaBiSmAd Posted May 20, 2008 Share Posted May 20, 2008 The temporary uploaded file and the $_FILES array are destroyed when the first form processing code ends. You cannot goto yet another form processing page unless you save the uploaded file and the $_FILES array somewhere, like in a session. Link to comment https://forums.phpfreaks.com/topic/106401-uploaded-file-missing-filename/#findComment-545406 Share on other sites More sharing options...
rubing Posted May 20, 2008 Author Share Posted May 20, 2008 oh! Link to comment https://forums.phpfreaks.com/topic/106401-uploaded-file-missing-filename/#findComment-545409 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.