Jump to content

boompa

Members
  • Posts

    305
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by boompa

  1. Looks like a test or homework question. Can you figure it out by adding the line I put there? <?php $val = ‘1.2.3.4.5.6.7.8.9.10.11.12’; $arr[] = array(‘a’=>explode(‘.’,$val)); print_r($arr); ?>
  2. You need to append the app child to the root element <?php $doc = new DOMDocument("1.0"); $doc->formatOutput = true; // Create root element $root = $doc->createElement("Applications"); // Append the root element to the document $doc->appendChild($root); // Create the child element $child = $doc->createElement( "app" ); // Append the child to the root element $attr = $root->appendChild($child); $attr->setAttribute("AppName", "NotePad++"); echo $doc->saveXML();
  3. Try the MySQL forum.
  4. $resource = mysql_query($query); if (!$resource) { echo json_encode(array('error' => mysql_error(), 'query' => $query)); exit(); }
  5. I'm confused as to whether this is the Superfish jQuery plugin or is somehow related to this Superfish, which is image-related, but doesn't appear to be for developers? More likely the OP is using a browser extension which is including Superfish's adware, like here.
  6. What browser are you seeing this in?
  7. Try reading this to get an understanding of what you need to do: http://techoctave.com/c7/posts/60-simple-long-polling-example-with-javascript-and-jquery
  8. You should also consider using a third-party mail library like PHPMailer or SwiftMailer, which will ensure the mail is properly composed and avoid getting lost in anti-spam filters.
  9. Here's a good comparison article: http://www.rackspace.com/knowledge_center/article/mysql-engines-myisam-vs-innodb I would go with InnoDB for transaction and foreign key support, as well as row-level locking (if two people are editing a ticket, you don't want one overwriting the other's changes).
  10. $this->db->fetch_array($this->db->query("SELECT * FROM `settings` WHERE `ident`='skype-api-url'")) This construct sucks anyway, because what if the query fails?
  11. $sqlSetning="INSERT INTO Kvarterbestilt(Møtt) WHERE Personnummer='$personnummer' VALUES ('$møtt');"; If you want to change the value of an existing record, you use an UPDATE query, not an INSERT: $sqlSetning="UPDATE Kvarterbestilt SET Møtt="'$møtt'" WHERE Personnummer='$personnummer'";
  12. You don't. You need to do some study on database work, because you have some misconceptions of how they work and should be used. Here's something for you to read to get started.
  13. Then apply bsmither's advice for starters...to every code that uses a function return as an array directly, like myFunction()[0]
  14. In that doc you linked, under the API Best Practices heading is an entry "Use Multiple Queries to Retrieve Over 500 Records" that tells you how to do your original task. For the following, use isset() to check if that property is set?
  15. Fact is at this point he or she shouldn't be using the mysql_ functions at all as they're deprecated, instead opting for PDO or mysqli. Also, not sure exactly what the goal is, but nested queries are never a good sign.
  16. You appear to be missing a }. Next time, please copy and paste the exact error.
  17. The URLs in your ean.php file are badly formed, resulting in no ean number: http://blah/11.php?ean= I am guessing that the 11.php should be index.php as well.
  18. Pretty sure you could do it with cURL and the CURLOPT_PROGRESSFUNCTION callback or the CURLOPT_WRITEFUNCTION callback
  19. If you look at the manual for mysqli_query, you'll see that it takes an extra first variable.
  20. Quick example: <?php $conn = ftp_connect("ftp2.bom.gov.au"); if (!$conn) { echo "Couldn't connect to server\n"; return 1; } if (ftp_login($conn, "anonymous", "test@example.com")) { $files = ftp_nlist($conn, "anon/gen/radar"); foreach($files as $file) { print("File: $file\n"); } }
  21. Jeez, you've been at this for a while! Why haven't you taken requinix's advice and fixed the exploit?
  22. It's just a copy/paste from a very bad online tutorial (to which I won't link; doesn't deserve it).
  23. Why wouldn't you just try it??? SMH
  24. OK, that was a massive code posting fail, as you can see. Try reposting your code, because what you've got there is useless as it stands. Also, if this is a payout question, it more likely belongs in the CSS Help forum, or perhaps the HTML Help forum.
  25. If you look at the manual page for the file() function, you'll see that it returns FALSE on failure. I suspect that is the case here.
×
×
  • 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.