Editing A .txt file in php?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
word32
Forum Commoner
Posts: 27
Joined: Sun May 29, 2005 5:07 pm

Editing A .txt file in php?

Post by word32 »

i have this .txt(datasheet.txt) document that contains my flash radio info, that my flash program reads

it looks like this:
&tracks=10&
&track1=song1.mp3&
&track2=song2.mp3&
&track3=song3.mp3&
&track3=song4.mp3&
&track3=song5.mp3&
&track3=song6.mp3&
&track3=song7.mp3&
&track3=song8.mp3&
&track3=song9.mp3&
&track3=song10.mp3&

i want to be able to change the info of "song1.mp3" to anything via a text feild

my host supports php, and mysql, but i dont know how to use databases

help plz

thx in advance
User avatar
Burrito
Spockulator
Posts: 4715
Joined: Wed Feb 04, 2004 8:15 pm
Location: Eden, Utah

Post by Burrito »

take a look at fwrite() to write out the txt file.

if you need help on saving the info to a db let me know and I'll provide you some guidance as to how to connect and interact with a mysql db.
Post Reply