Jump to content

ManiacDan

Staff Alumni
  • Posts

    2,604
  • Joined

  • Last visited

  • Days Won

    10

Everything posted by ManiacDan

  1. 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.
  2. 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.
  3. 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.
  4. Once you change the password to your database, you must put the new password in your code.
  5. You're probably single-quoting the variable, which won't work. that's all we can say without looking at code.
  6. 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 /
  7. 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.
  8. 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']));
  9. $_GET is an array of all the variables passed to your page in the URL.
  10. 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.
  11. 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);
  12. 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.
  13. You might want to read up on the session
  14. $_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.
  15. 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'
  16. 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)
  17. His code replaces a big block of your code. See how the structures are similar?
  18. 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.
  19. 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
  20. The API you're posting to requires a specific content-type, and you are providing the wrong one. CURLOPT_HTTPHEADER is the option you must use to set the proper content type. Also, why is your XML all encoded like this?
  21. If you believe that question is self-explanatory then your answer is "err...no...?" If you're asking "is it possible to have conditional code inside a class but outside the functions in that class" then the PHP interpreter itself could have given you that answer: trying to do that produces a fatal error.
  22. You have absolutely no idea how to debug a script on your own? What do you do when there's a problem like this? Do you just stare at the screen and pray that you'll see it? I've given you the steps you need to take to start debugging. they were in the list of questions you failed to answer.
  23. You must wrap the entire list in a single form tag, only one form can be submitted at a time. If the problem is now "my site looks all weird," then xyph is right, your problem is a style one not a PHP one.
  24. Sports scores are important and valuable information, you cannot get them for free. You'll have to buy them from someone. I believe Yahoo might sell this information.
  25. Asking "would I use explode" is like asking "how would I climb a mountain, would I use a rope?" Yes, you would...and 5,000 other things. If you want to allow people to select multiples of something, name the checkboxes "selection[]" and put the values as the IDs you want to select. Then $_POST['selection'] will be an array of the items selected. You can loop through them using foreach.
×
×
  • 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.