hi guys, i have this code
<?php
$file = fopen("12.txt", "r") or exit("Unable to open file!");
//Output a line of the file until the end is reached
while(!feof($file))
{
echo fgets($file). "<br />";
}
fclose($file);
?>
which works a treat, but instead of actually specifying which file to read, i want to be able to select the file using a BROWSE button on the site, then press another button and it reads the file to screen
i have added this
<form action="2.php" method="post" enctype="text/plain">
<p>select file to read:
<input type="file" name="postednfo" /></p>
<p><input type="submit" name="read" value="read" </p>
so i can select the file, but how to i tell it to read the file ive selected?
thanks guys much appreciated