Jump to content

ManiacDan

Staff Alumni
  • Posts

    2,604
  • Joined

  • Last visited

  • Days Won

    10

Everything posted by ManiacDan

  1. The generally accepted way to do this is to use bbcode or wikimarkup or some other non-html formatting language to generate the quotes. Reddit just considers any line that begins with a right angle bracket to be a quote. PHPFreaks obviously uses bbcode [ quote=thePerson ] tags (with a LOT of extra data). BBCode parsers are difficult to write but should be easy to find online. Reddit-style highlighting indicators and/or @tags would be easier.
  2. First of all, there's almost certainly a better solution than what you're doing. Secondly, what ARE you doing? You want a single page to reload itself without the query string? Third, what is $l and why do you think it will be populated?
  3. Do you have output buffering turned on by default or something?
  4. Right, the session cookie does nothing but hold a KEY to a file on your server, which contains the actual session information.
  5. No. if you need more help than this, you need to be taking a class or reading a book, not asking random people on the internet. You've already made a page to display records, where did that come from?
  6. Write a page to display a single entry based on ID. Use $_GET['id'] Link the page you already have to that page. Add "?id={$row['picture_number']}" to the URL. Come back when you're stuck on either of those steps.
  7. Write that page. Put a link to it at the end of every row. I mean, I know you're new to PHP, but "write the page" is about as close as we can get.
  8. while($row = mysql_fetch_assoc($result)) That line appears twice in your code. If you indent your code properly, you'll be better able to notice redundancies like this (and the elseif mentioned earlier). Remove the outer while($row = mysql_fetch_assoc($result)) and your code will stop skipping the first result.
  9. Once you change the password to your database, you must put the new password in your code.
  10. You're probably single-quoting the variable, which won't work. that's all we can say without looking at code.
  11. 1) I don't know if your includes are right because only you can tell us that. Print out the complete string you're including and see if it's pointing to the right file. If so, it's right. 2) Your links are all relative as well, you need to use your full domain or start your links with a /
  12. but I formated the date for them too, i just forgot the _ in the middle of DATE_FORMAT() was all I didn't even notice that. Yes, everything muddy_funster said will fix all your problems if you put that underscore there.
  13. A number of things: 1) You removed your db password from this page, but I bet you didn't change it in your actual database. You have told (according to the counter here), 35 strangers your database password, and it's indexed by google. You must change it, now. 2) Adding the ORDER BY that Muddy_Funster suggested will fix your ordering problem unless your picture number isn't stored properly in your database, but you'll have to define "didn't work" first. 3) Formatting your date output can be done with date() and strtotime(), like so: date('d-m-Y', strtotime($row['birthdate']));
  14. $_GET is an array of all the variables passed to your page in the URL.
  15. Please post formatted code, and surround it with [ php ] tags. ...and change your database password. Right now. Stop reading and go change it. You've posted it in public.
  16. Why are you using $_GET[$format_sum]? That won't work. You'll need to just use $format_sum I think. Also, you're developing without error_reporting turned on. That's a bad idea, you'll never see your errors. Either turn it on in php.ini or put this at the top of every script you're working on: error_reporting(E_ALL);
  17. You don't have any quotes around your attributes for that object tag, maybe it's malformed. What plugin does the client say he needs? Maybe his flash player is woefully out of date.
  18. You might want to read up on the session
  19. $_SERVER['DOCUMENT_ROOT'] contains the full path to the root of your webserver. Use that in all your include() and require() statements so that regardless of how "Deep" you are in the folder structure, your includes will always go to the right file. You don't need to mess with htaccess for this.
  20. 1) Scraping this website is against their ToS and I'm therefore closing this thread. 2) You must add modifiers after your closing delimiter to get your regex to match mulitple lines. Specifically add an 'm'
  21. 1) It echoes "Array" because you're trying to echo an array, when you need to be using print_r() 2) preg_match_all makes a multi-dimensional array with an internal array for each group of matches. Therefore... 3) Your loop should be on $matches[1] which will contain all of the matches for your first capture group (the hashtags)
  22. His code replaces a big block of your code. See how the structures are similar?
  23. The manual has all your answers, go read again. mod-edit: removed abusive language I never should have used
  24. I have no idea what the correct format is, nor do I know what the correct header is...because of the two of us, only you have access to the documentation for this API.
  25. Both times you see the word "mail(" in this code, it's sending an email. The third argument to that function ($text and $contentmsg) is the email body. You can dump them to a log file using fopen and fwrite
×
×
  • 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.