Jump to content

Maq

Administrators
  • Posts

    9,363
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by Maq

  1. I guess there was more pertinent code you didn't post.
  2. Did you even read my previous posts?
  3. So you're not sure... Echo your update query and add some error checking: <php require "../database/db.ini.php"; if(isset($_GET['accept'])) { $theid = $_GET['accept']; $queryString = "UPDATE `users` SET `active`='1' WHERE `id`='$theid'"; echo $queryString; try { mysql_query("UPDATE `users` SET `active`='1' WHERE `id`='$theid'"); } catch(Exception $e) { echo $e->getMessage(); } } ?>
  4. Are you sure $theid has a value? If so, are there any errors? You should be catching exceptions from the mysql block.
  5. Interesting project, I just finished the survey.
  6. 1) This sounds like it could be some sort of homework. 2) Have you attempted doing this yourself? You'll never learn if you don't try. 3) Do you have any sample data? 4) What exactly are you stuck on?
  7. For the forums there is a nice mobile view already, also IPB also has an app you can download for you phone. For the main forums, I'm not sure there's a need.
  8. No, XPath indexing starts at 1. Also, your expression matches on Avslutad . Weep, if you tell us what exactly you're trying to match on, we can give you the best XPath solution. Good to know.
  9. After looking at your code I noticed a few things: 1) You should be using the method loadHTMLFile() not loadHTML(). The former method loads HTML from a FILE, the method you were using thought "test.html" was literally the HTML. 2) Turn on error reporting when you are debugging. 3) You should be declaring your namespace, in this case it's xmlns. Try: <?php // Report all PHP errors error_reporting(E_ALL); error_reporting(-1); $husdjur = new DOMDocument(); $husdjur->loadHTMLFile("test.html"); $xpath = new DOMXPath($husdjur); $xpath->registerNamespace("xmlns", "http://www.w3.org/1999/xhtml"); $tableRows = $xpath->query('/html/body/table/tbody/tr[1]/td[1]'); foreach($tableRows as $result) { echo $result->nodeValue; echo "\n"; } ?>
  10. It redirects to brm.com...
  11. To answer questions 1, 2, & 3 when you create your GUI you should be creating a separate JPanel and adding it to your JFrame. You can update them dynamically in your Listener methods. If you want specifics post your code with the main JFrame container and where these methods reside.
  12. Take a step back and read the comments you made about each paradigm: Given the description of the components & features of your website, it doesn't seem like a trivial task and most likely you will be updating & adding to it. I think you can figure out which one suits your situation.
  13. To expand on what requinix suggested, your design seems to be flawed if you need to do something like that. Show us some code and explain what you are trying to do.
  14. 1) That's not Java, that's javascript. 2) What does "but its not really working" mean? What's supposed to happen? Errors? Please elaborate.
  15. You said it right in your post, just add in the condition: WHERE id < 100 AND quantity > 0 ORDER BY id DESC');
  16. Have you looked in the apache logs to see what the error is?
  17. If the work is too easy then you might want to ask your superior to be assigned something a little more advanced.
  18. We really can't tell YOU the best way to learn, but, as aforementioned, getting your hands dirty with practice and experience seem to have the best effect. You can read and follow all the tutorials in the world but until you learn to think for yourself for problem solving, design, etc. you won't learn PHP, or most languages for that matter. I started learning PHP by taking a class in school but what really helped me was my first internship. I worked at a company that owned a bunch of e-commerce sites. I primarily maintained and implemented customized feature requests into those sites. While at my internship I registered here to get help and eventually I was the one helping others.
  19. Why don't you use an API instead of screen scraping like a barbarian? There are plenty of free and pay for ones, for example - http://developer.espn.com/docs/scores.
  20. Yeah ^. Probably this one - http://forums.phpfreaks.com/topic/269121-echo-syntax-error-generating-html-code-with-php-bits-subed-in/?do=findComment&comment=1382895
×
×
  • 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.