Posting to a text file
Posted: Tue Aug 17, 2004 11:07 am
Hello there,
I am currently trying to create a blog, but instead of posting the information to a database, i am posting information to a text file (not my idea). When i am posting regular text information i have no problems, but the flow starts to get a bit funky when i try to post an image name to the text file.
I have an image uploade page that submits an image to a folder on my server, and at the same time posts the image name to an append page that together with information from text feilds is posted to the text file.
This text file will then enable me to display inputted information and display the image by surrounding the image name pulled from the text file with <img src... tags.
As anyone who has worked with displaying information from text files the information in the text file can not have any spaces or empty rows, because the display features are depenedent on the format of the text file.
My problem is that when the information about the image is posted it creates a missed line in the text file, but the regular text information does not create any spaces.
I have probably confused myself even more with this explanation attempt, so if anyone does not understand my problem please let me know.
Thanks to anyone who takes the time to read this post.
I Reh
P.s let me know if you would like to see the code that i have used
I am currently trying to create a blog, but instead of posting the information to a database, i am posting information to a text file (not my idea). When i am posting regular text information i have no problems, but the flow starts to get a bit funky when i try to post an image name to the text file.
I have an image uploade page that submits an image to a folder on my server, and at the same time posts the image name to an append page that together with information from text feilds is posted to the text file.
This text file will then enable me to display inputted information and display the image by surrounding the image name pulled from the text file with <img src... tags.
As anyone who has worked with displaying information from text files the information in the text file can not have any spaces or empty rows, because the display features are depenedent on the format of the text file.
My problem is that when the information about the image is posted it creates a missed line in the text file, but the regular text information does not create any spaces.
I have probably confused myself even more with this explanation attempt, so if anyone does not understand my problem please let me know.
Thanks to anyone who takes the time to read this post.
I Reh
P.s let me know if you would like to see the code that i have used