spillage Posted April 23, 2008 Share Posted April 23, 2008 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 https://forums.phpfreaks.com/topic/102525-using-cutline/ Share on other sites More sharing options...
DarkWater Posted April 23, 2008 Share Posted April 23, 2008 That would be hard, annoying, useless, error-prone, and slow. >_> A database would be MUCH better. =/ Link to comment https://forums.phpfreaks.com/topic/102525-using-cutline/#findComment-524908 Share on other sites More sharing options...
GingerRobot Posted April 23, 2008 Share Posted April 23, 2008 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. But yes, a database would be easier. Link to comment https://forums.phpfreaks.com/topic/102525-using-cutline/#findComment-524910 Share on other sites More sharing options...
DarkWater Posted April 23, 2008 Share Posted April 23, 2008 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. @_@ Link to comment https://forums.phpfreaks.com/topic/102525-using-cutline/#findComment-524911 Share on other sites More sharing options...
spillage Posted April 23, 2008 Author Share Posted April 23, 2008 messge received and understood. thats another idea ill scrap. Thanks again Link to comment https://forums.phpfreaks.com/topic/102525-using-cutline/#findComment-524914 Share on other sites More sharing options...
DarkWater Posted April 23, 2008 Share Posted April 23, 2008 xDDD Do you have a database that you can use? o-o Link to comment https://forums.phpfreaks.com/topic/102525-using-cutline/#findComment-524916 Share on other sites More sharing options...
GingerRobot Posted April 23, 2008 Share Posted April 23, 2008 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 https://forums.phpfreaks.com/topic/102525-using-cutline/#findComment-524923 Share on other sites More sharing options...
DarkWater Posted April 23, 2008 Share Posted April 23, 2008 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. Link to comment https://forums.phpfreaks.com/topic/102525-using-cutline/#findComment-524925 Share on other sites More sharing options...
spillage Posted April 23, 2008 Author Share Posted April 23, 2008 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 https://forums.phpfreaks.com/topic/102525-using-cutline/#findComment-524935 Share on other sites More sharing options...
DarkWater Posted April 23, 2008 Share Posted April 23, 2008 Eep, SQLite. Change that to MySQL if you can. Really. It'll be much easier. Link to comment https://forums.phpfreaks.com/topic/102525-using-cutline/#findComment-524937 Share on other sites More sharing options...
GingerRobot Posted April 23, 2008 Share Posted April 23, 2008 If you've installed wamp then you've installed mySQL - its what the 'm' stands for Link to comment https://forums.phpfreaks.com/topic/102525-using-cutline/#findComment-524944 Share on other sites More sharing options...
spillage Posted April 23, 2008 Author Share Posted April 23, 2008 sorry ginger robot you are correct I was looking at the sqllite manger on list. Link to comment https://forums.phpfreaks.com/topic/102525-using-cutline/#findComment-524955 Share on other sites More sharing options...
DarkWater Posted April 23, 2008 Share Posted April 23, 2008 If you've installed wamp then you've installed mySQL - its what the 'm' stands for Lol, wasp. Windows Apache SQLite PHP. =P Lol, windows. Link to comment https://forums.phpfreaks.com/topic/102525-using-cutline/#findComment-524957 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.