Jump to content

using cutline


spillage

Recommended Posts

have an idea in the back of my head to create a page in which a table shows info from a txt form. At the end of each row would be a radio box that if ticked would delete that line from the txt file.

 

really am a total beginner but just for starters could you make the value of the radios automated to match the number of rows.

starting to understand php a bit more but dont half lose my head when mixing in html.

 

have had a quick look around on google but so far only found info on using cutline which require the number of the line to be inserted.

 

Sure that using a db would be easier but and just interested how easy this would be.

 

Cheers,

 

Mark.

 

 

Link to comment
Share on other sites

It wouldn't THAT bad. If you made use of the file() function to read the textfile into an array, it would be straightforward to keep track of which lines you wanted deleting.

 

That'd be slow too. =/  Much slower than a database. @_@

 

I dont think thats necessarily true. Have you seen the amount of use SQLite gets? While i have no experience with it, I understand that given the right situation, it works fantastically well.

 

Also, i think working with text files can be a great learning tool. If you've only started with programming recently, then it can help your understanding of arrays a lot.

 

That said, i'd still use mySQL.

Link to comment
Share on other sites

It wouldn't THAT bad. If you made use of the file() function to read the textfile into an array, it would be straightforward to keep track of which lines you wanted deleting.

 

That'd be slow too. =/  Much slower than a database. @_@

 

I dont think thats necessarily true. Have you seen the amount of use SQLite gets? While i have no experience with it, I understand that given the right situation, it works fantastically well.

 

Also, i think working with text files can be a great learning tool. If you've only started with programming recently, then it can help your understanding of arrays a lot.

 

That said, i'd still use mySQL.

 

I'll agree that working with text files can be a decent learning experience for new programmers, but there are other reasons to learn text file manipulation.  While SQLite is okay, MySQL blows it out of the water. :o

Link to comment
Share on other sites

I have had a quick look at db and am using wamp2 so have sqllite. I could set up a db to practice with but ive not really cover the use of them. just thought that using a flat file would be and easier way to learn my way around php. The file only contains 2 emails and an id number if that has any relevance.

 

Cheers,

 

Mark.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.