100%
|
Post by Aaron on May 1, 2005 9:48:06 GMT -8
I decided to try and code something flatfile. The only other things I've coded was DGF but that ran off of mysql .. so what I'm doing is a little bit harder. www.darkgamer.com/guestbook/index.phpLast Update: May 8, 2005 Line break problem fixed.
Last Edit: May 8, 2005 12:51:55 GMT -8 by Aaron
|
|
|
Post by CD on May 1, 2005 10:05:29 GMT -8
Naruto, I'll PM you the code I made for the comment system, it explains it all really. Oh, and good luck, it shouldn't be hard. Feel free to use parts of my code, or whatever.
|
|
100%
|
Post by Aaron on May 1, 2005 10:12:28 GMT -8
Hey Thanks! I'll go look at it =]
|
|
|
Post by CD on May 1, 2005 10:13:00 GMT -8
No problem. Crazy wanted to see it also. O.o
|
|
|
Post by CrAzY_J on May 1, 2005 10:21:24 GMT -8
No problem. Crazy wanted to see it also. O.o Silence Im more used to work with flat files then mysql
|
|
|
Post by CD on May 1, 2005 10:22:44 GMT -8
I don't even know MySQL, let alone have a host with it. I have to work with flat files.
|
|
|
Post by CrAzY_J on May 1, 2005 10:29:46 GMT -8
google easyphp or apache
to host your own php/mysql files ^-^
|
|
100%
|
Post by Aaron on May 1, 2005 10:56:47 GMT -8
I looked at your coding and it is definately different than mine, which isn't a bad thing, we all have our own styles. I understood all your coding except this: <?php // Load previous comments $data = file ('comments.txt'); $n = count ($data); for($x = 0;$x<=$n;$x++){ $dat = $n-$x; print $data[$dat] . ' '; } ?> I'm guessing this is how it is displayed in newest - oldest order? Am I correct? -- I fixed my coding so now it actually allows you to enter stuff =] Test it out. *edit: I got it to say "there are currently no entries" when there are 0 entries.
Last Edit: May 1, 2005 11:04:28 GMT -8 by Aaron
|
|
|
Post by CD on May 1, 2005 11:27:21 GMT -8
Yep, that's the part of the code. You'd you just "$x" for the oldest to newest, and $n-$x for the newest to oldest. $n is the total and $x is 0, the loop sends it into motion.
|
|
100%
|
Post by Aaron on May 1, 2005 11:46:22 GMT -8
Okay, thanks!
|
|