0

hi guys! im noob in php. Could you please help me in uploading then reading text file in php? Heres the example format in text file:

201005040939040105-646A

Then this must be posted to a table(<table></table>). Example:

| 20100504 | 0939 | 040105-646 | A |

separated by 5 columns. First column consist of 8 characters, Second 4, Third 10 and Fourth 1 characters.


any help is much appreciated! Thank you guys!

Edited by BOOGIEjo: :)

2
Contributors
2
Replies
5
Views
6 Years
Discussion Span
Last Post by BOOGIEjo
0

To upload file use this code...
upload.php

<html>
<body>

<form action="uploader.php" method="GET"
enctype="multipart/form-data">
<label for="file">Filename:</label>
<input type="file" name="file" id="file" /> 
<br />
<input type="submit" name="submit" value="Submit" />
</form>
uploader.php
<?php
//51
echo "Party Symbol<br/>";
//if($_FILES["file"]["name"])
  {
  echo $_FILES["file"]["name"];
  echo $_FILES["file"]["tmp_name"];
      move_uploaded_file($_FILES["file"]["tmp_name"],
      "./record/" . $_FILES["file"]["name"]);
           
         }

?>
</body>
</html>

Check this link to read the data from a text file and then show data in the fixed format...Click here
if you want to read data in the middle the use this...after reading complete data...Click here

Hope this is what you were looking for...

PS-If your problem is solved mark the thread as solved

Edited by tomato.pgn: n/a

0

I dont get the code you posted for uploader.php.
Anyway. thank you so much.. :)

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.