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. Quote Link to comment 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. =/ Quote Link to comment 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. Quote Link to comment 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. @_@ Quote Link to comment 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 Quote Link to comment 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 Quote Link to comment 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. Quote Link to comment 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. Quote Link to comment 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. Quote Link to comment 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. Quote Link to comment 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 Quote Link to comment 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. Quote Link to comment 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.