Jump to content

Adam

Moderators
  • Posts

    5,717
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Adam

  1. As vineld is getting at, I'd not use text files to store your jokes as it makes creating things, like an admin panel, much more complicated. Store your jokes in a database along with the categories. Look into relational databases and how they're used, think how they could be used in your situation. I'd also recommend looking into mod_rewrite so you don't have to maintain a set of directories. Once you have a much better setup the admin panel will be a lot easier work...
  2. Or just add an auto_incrementing ID field to the table and it will automatically assign a unique ID for every record?
  3. Do you have a demonstration of it not working?
  4. What part of it do you want feedback on? Think this may be better suited to the BETA test forum...
  5. It's okay, it's a little bland though. The distance between the content boxes varies so it looks quite uneven as well. The navigation looks really squashed. I think the 'how it works' image is a little much for the homepage, could you not create a simpler version? I'd use divs + css for layout as apposed to tables, and also make it validate. A lot of the content is just images which is really bad for SEO, could you not convert them to text? Overall not too bad though!
  6. You need to learn regular expressions; specifically Perl compatible regular expressions if you want to use them with the 'preg' functions. There's a 'resources' sticky in the regex forum.
  7. I'd use a non-greedy match: (.*?)
  8. You need to specify the content type with the header function.
  9. If you look at the source they'll be in their entity form, the browser converts them.
  10. No it won't, show us some code...
  11. I'd recommend reading this: http://www.phpfreaks.com/tutorial/php-security (speifically section 4)
  12. How could you echo out a variable that hasn't been given a value? You need to re-think your logic.
  13. $_POST is an array not a string. Take a look at the manual.
  14. Trust me MySQL is much simpler than this, but, if you want to take this approach, I'd recommend storing the posts in a different format. Perhaps in JSON, or to make it easier split bits up using delimiters. This way it won't matter in which order they are stored because you could explode them or parse them into an array that you can work with far easier; sorting by date, alphabetically... however you want. Then you just have to format the data and output it. Will make changing the design, style, etc. later on much easier for yourself as well.
  15. Why not use a database? Make things a hell of a lot simpler for yourself. Edit: By the way try searching Google for "writing text to the start of a file without overwriting php" - top result!
  16. You're sending a header straight after you flush the buffer: ob_end_flush(); header('Content-Type: text/xml');
  17. Although it's changed now, I've seen the original design (I didn't have the time to reply then). Kind of like others have said, I think the style you were going for didn't really match what your business was for - so I'm glad you're going in a new direction. The new design I'd say is more on track, but still doesn't quite fit. Also the definition of priceless states 'free of charge. zero cost'. I wouldn't label your product free of charge considering when you click the "Free?" link there's a price in there.
  18. It's basically testing to make sure that "uieth" has either been passed as a $_POST or $_GET parameter, and if so it's assigning it to the $meith variable; default value of 0.
  19. Wha? As in http request 'setMethod'? There's no particular reason why you'd use it there.
  20. Just put a file on your web server, perhaps "phpfreaks.txt", with your username as the content.
  21. I think the problem is that $_post does not equal $_POST.
  22. A lot of people do that kind of thing on this website, in the 'freelancee' board.
  23. Adam

    preg_match

    If you replace the preg_match() functions with preg_match_all() and take a look at the difference in the data returned, you should be able to spot how you can use it for 2, 3, 4, etc. different quotes in a single post.
  24. Haha! Perhaps re-read that to yourself a few times?
×
×
  • 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.