angrytuna
02-10-2004, 04:23 AM
Hello,
I am trying to get a handle on the "input type = file" tag. What I'd like to do is allow the user to upload an image file, and subsequently display the image in the gaining page.
Essentially, the code I'm using is like so:
[page1.php]
...
<form action="page2.php" method="post" enctype="multipart/form-data">
Image to Upload <input type="file" name="impath" />
...
[page2.php]
...
<img src="<?php print $_POST['impath']; ?>" />
...
which gives me nothing. I've also tried:
...
<?php print $_POST['impath']; ?>
...
which just gives me the filename of the file submitted, and not its contents. I would've expected the previous to give me at least a long string of binary data. What gives? Would appreciate any help.
AT
I am trying to get a handle on the "input type = file" tag. What I'd like to do is allow the user to upload an image file, and subsequently display the image in the gaining page.
Essentially, the code I'm using is like so:
[page1.php]
...
<form action="page2.php" method="post" enctype="multipart/form-data">
Image to Upload <input type="file" name="impath" />
...
[page2.php]
...
<img src="<?php print $_POST['impath']; ?>" />
...
which gives me nothing. I've also tried:
...
<?php print $_POST['impath']; ?>
...
which just gives me the filename of the file submitted, and not its contents. I would've expected the previous to give me at least a long string of binary data. What gives? Would appreciate any help.
AT