Jump to content

ManiacDan

Staff Alumni
  • Posts

    2,604
  • Joined

  • Last visited

  • Days Won

    10

Everything posted by ManiacDan

  1. $rowNum = 0; while ( $row = fetch() ) { if ( ++$rowNum % 2 == 1 ) { //style = white } else { //style = grey } }
  2. You're confusing a file's header() (present on all files and not part of the content of the file) with the HTML <head> element (nothing to do with file headers, just some random part of the document).
  3. You're saying that this produces two columns that are the same width? <table> <tr> <td>safnwieuncv78923n7p48837oqnv8o3nijenvioulnvruionvoiuawneviuanewviouanweviouanweviouawenviouweavnuiwean</td> <td>abcd</td> </tr> </table>
  4. are you viewing it in a browser?
  5. Missed your reply: SELECT jos_cp_fb_moderation.userid AS userId, child.id AS categoryId, child.name AS categoryName, parent.id AS parentCategoryId, parent.name AS parentCategoryName FROM jos_cp_fb_moderation JOIN jos_cp_fb_categories AS child ON jos_cp_db_moderation.catid = child.id LEFT JOIN jos_cp_fb_categories AS parent ON child.parent = parent.id WHERE jos_cp_fb_moderation.userid = 617 -Dan
  6. data/language.txt should be a plain text file with one sentence per line.
  7. Just re-visited this thread to realize: You need to quote your format string, NOT your column name. Three basic syntax errors.
  8. I keep looking for the "agree" button since I've been on devshed for so long. This guy is great though.
  9. To just get right to the point, you need to quote your strings. Both of these errors have been basic mysql syntax problems.
  10. In general, if you're storing specific variables in an array, name the indexes so you know which is which. If you're storing a bunch of variables that are all the same kind, you don't need to name them.
  11. You said nearly 2 months ago that you have code that will pull the data. Run the code. Does it pull the data?
  12. You're exactly right about the first part, then you get wrong. When you create the array, you do an isset call and only add to the array when the item is set. Yes, exactly right. Then you attempt to use the fourth element in the array. What happens if that's not set? You get the error. Also note that this code has no way of telling which variable is which in this array. You assume that $array[2] is con_id. What if $dislikes isn't set? Then con_id will be in $array[1] You need to rethink this whole thing and look into naming your array keys, so you have $array['con_id'] instead of $array[2]
  13. That too.
  14. So at least two of those are unset. See how that works? Your array is randomly one or more of those 4 items, yet your function assumes all 4 will be there.
  15. if ((isset($array[0]) || isset($array[1])) && isset($_SESSION['user_id'])) { // check to see if user has already voted on given contribution $query = "SELECT * FROM votes WHERE con_id = '$array[2]' AND user_id = '$array[3]'"; That section checks for array elements zero and one, and then uses array elements two and three. If we had the actual error message, we might be able to tell if that's the problem.
  16. You could enable it in the server configuration file, or use curl.
  17. The @ before your function call suppresses errors. Never ever turn off errors, especially when you're trying to debug. Remove the @ and you should be able to see what's wrong.
  18. Per the manual, if $_SERVER['HTTPS'] is set, the script was accessed through https.
  19. The coordinates are the two points of opposite corners of the rectangle that defines the clickable area: coords="0,0,82,126" That defines a rectangle starting from 0,0 (the top left corner) and goes to 82,126 (in this image, roughly halfway across the bottom).
  20. That box on the right isn't working for me in chrome. Clicking the arrows produces garbled output, mousing over it only makes it worse. None of the "copy and visit site" links work. Your error handler is still hard-coded to "localhost," unless you happen to have my exact error handler from my payment processing company's development environment on your server. Your hover-menus fade in after nearly a quarter second. Far too long. The "popular stores" box isn't tall enough, the links are cut off There is a large white space below that box. Your "we are social" box takes a while to load, but I imagine it's loaded asynch with JS.
  21. aditd, welcome to the forums. Please check to see what the date on a thread is before you post, you've revived a thread from nearly 2 years ago.
  22. The getPriceHtml() function needs to be altered, unless it's a magical function that doesn't actually exist. If it's magical, make a new function with a custom name that wraps getPriceHtml() and formats it properly, so you don't have any weird code in your display logic.
  23. Like Andy pointed out, both break and continue accept numerical arguments for the level of control structures you wish to break out of. -Dan
  24. Keep this file OUTSIDE of the webroot, and use a PHP script to check permissions, read the file, and dump it to the user with proper headers.
  25. If some behavior leads you to believe there is a specific error condition, check it. Why do I have to say "what are the contents of the session when this happens?" Check that yourself. If something is wrong, dump the relevant variables to the screen or a log file until you figure out what the problem is.
×
×
  • 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.