Jump to content

Maq

Administrators
  • Posts

    9,363
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by Maq

  1. Not sure exactly what you're trying to do. But if you want to loop through each question and all of its children then you can use something like: ini_set ("display_errors", "1"); error_reporting(E_ALL); $req = "http://answers.yahooapis.com/AnswersService/V1/questionSearch?appid=YahooDemo&query=php"; $res = file_get_contents($req); $xml = simplexml_load_string($res); foreach ($xml->xpath('/ResultSet/Question') as $question) { // "//question" means for each question node foreach($question->children() as $name => $child) { echo $name . "\n" . $child; // you get all the child nodes in $question } } ?> You may also want to write a cron job that collects the XML and stores it locally so it doesn't take as long to load the contents.
  2. Some of my favs: Goldeneye Mario Kart Starfox
  3. It's hard to believe that you can't find any 'good' tutorials on Google for implementing reCAPTCHA.
  4. Did you have a question, what's the issue?
  5. I'm really not sure how you're trying to achieve this. Do you have the status of the site stored in the DB? If that's the case, then you would want to pass in the site's name (or however you're going to reference it) and use it in the query by adding a conditional WHERE clause so you can extract the specific data for that site. You should also be returning a boolean as to whether or not it's online.
  6. The way you're passing in 'n' is illegal in PHP. It's probably causing a fatal error and displaying a blank screen. In a development environment you should have error reporting displaying and set to max. Also, what's the point of passing in a parameter if you're not even using it in your method?
  7. It orders the results by last_name, but if there are multiple results with the same last name there is a secondary ordering by the first name.
  8. You can view all topics you have created by going to Profile >> Show Posts >> Topics.
  9. These types of errors should be easily detectable from syntax highlighting. What IDE/editor are you using?
  10. http://www.oscommerce.com/ is another popular one along with an active support community.
  11. This topic has been moved to PHP Regex. http://www.phpfreaks.com/forums/index.php?topic=306874.0
  12. This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=306850.0
  13. How is it not working?
  14. Maq

    join issues..

    What's the error...?
  15. This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=306846.0
  16. This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=306845.0
  17. If I understand you correctly, yes PHP has function arguments (IN) and also also returns (OUT).
  18. Most likely your query is invalid. What types of columns are 'value1' and 'value'? My guess is that your columns are a type that require single quotes around them. For a quick and dirty way to display mysql errors you can modify your code to this: mysql_query("UPDATE DB SET value1 = $_POST['data1'] WHERE value = $_POST['data2']") or die("Error: " . mysql_error()); For a better way and explanation of how to properly handle mysql errors you should read this - http://www.phpfreaks.com/blog/or-die-must-die. You should also sanitize your post values with mysql_real_escape_string.
  19. You are getting 'Notices' which shouldn't terminate your script and are different from errors. These types of Notices usually mean you're trying to use a string without quotes or you're just defining a constant incorrectly. In your code I also noticed: if ( isset($_SESSION['url']) && $_SESSION['url'] != $SITE_URL ) { Where is $SITE_URL defined? - I'm still not seeing where 'RRP' and 'MORE_*****' are being defined. They should be in one of your include files. - When posting code, please place your code inside tags for syntax highlighting, formatting and general readability. - The link you posted in your first post doesn't work, or at least we can't see the script you're trying to implement.
  20. Show us the code where you define these constants.
  21. Define "doesn't work". Does that mean a blank page, doesn't do what it's supposed to, what happens?
  22. This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=306588.0
  23. You can temporarily set error reporting on and to max by putting these 2 lines directly after your opening <?php tag: ini_set ("display_errors", "1"); error_reporting(E_ALL);
  24. Maq

    query help

    How do you know when a room is occupied? Also, what is your FK that relates 'visit_data' and 'rooms'?
×
×
  • 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.