Jump to content

ignace

Moderators
  • Posts

    6,457
  • Joined

  • Last visited

  • Days Won

    26

Everything posted by ignace

  1. You don't and you wouldn't use: if(isset($_POST['submit'])) but: if (!empty($_POST))
  2. SELECT * FROM table WHERE time1 BETWEEN time2 AND now()
  3. I wasn't anymore referring to adding a copyright notice. But it just hit me to what would happen if they would? Like for example material they bought and provided source code from that material.
  4. if ($maximum_count > 150) { return ''; }
  5. $ip = $_SERVER['REMOTE_ADDR;']; //Code provided by Ignace echo "Your IP is: $ip"; You don't need to credit my work everything I do is open-source But I wonder what happens if someone would post code that is copyright protected? The forum won't be held responsible so the poster is? Oh my!
  6. LOL
  7. Besides if you are using work from someone else shouldn't you need to be crediting them?
  8. else if ($smtime<=8||$smtime<17){echo"Open";} Oh so you are only closed between 17 and 23:59 And when would: else {echo"Open";} ever execute?
  9. No. I'm saying Java is not JavaScript their is a distinct difference between both. I found a tutorial that does what you want: http://www.wil-linssen.com/jquery-sortable-lists-with-drag-drop-handle/
  10. You can't. <img> will just crop the image to the desired dimensions using the width and height attribute. You need a server-side script to limit an image upload to some desired dimensions.
  11. Wrong. You only need a simple update statement. If you would use transactions you would be able to rollback so if my character would take damage it would automatically heal if you would rollback. START TRANSACTION; UPDATE characters SET health = 25 WHERE id = $id;//25 HP ROLLBACK;//40 HP
  12. if (0 === ($i % 2)) { echo '<br>'; } echo '<span>' . $record . '</span>';
  13. 1. ORDER BY month(timestamp) 2. WHERE month(now()) = month(timestamp)
  14. output_buffering is PHP_INI_PERDIR so you can by using a .htaccess alter the buffer to 0
  15. And then we aren't yet talking about variable hours or lunch time?
  16. UPDATE shop_products p,inventory1 i1,inventory2 i2 SET p.product_in_stock = '0' WHERE p.product_sku != i1.SKU AND p.product_sku != i2.PartNumber
  17. Then how do you know that what I said was in Dutch?
  18. Woeps sorry: function directory2xml(&$xmlRoot, $directory, $recursive = true, $ignore = array()) { if (!is_dir($directory) || !is_readable($directory)) return false; $files = scandir($directory); foreach ($files as $file) { if ('.' === $file[0] || in_array($file, $ignore)) continue; $fullpath = implode(DIRECTORY_SEPARATOR, array($directory, $file)); if (is_file($fullpath)) { $xmlRoot->appendChild(new DomElement('file', $fullpath)); } else if ($recursive) { $project = $xmlRoot->appendChild(new DomElement('project')); $project->setAttribute('name', $file); directory2xml($project, $fullpath, $recursive, $ignore); } } } $dom = new DomDocument('1.0', 'ISO-8859-1'); $root = $dom->appendChild($dom->createElement('structure')); directory2xml($root, realpath('path/to/directory'), true, array('cgi-bin')); print $dom->saveXml(); Check if that works I know what the problem is not sure this solves it.
  19. Try: function directory2xml(&$xmlRoot, $directory, $recursive = true, $ignore = array()) { if (!is_dir($directory) || !is_readable($directory)) return false; $files = scandir($directory); foreach ($files as $file) { if ('.' === $file[0] || in_array($file, $ignore)) continue; $fullpath = implode(DIRECTORY_SEPARATOR, array($directory, $file)); if (is_file($fullpath)) { $xmlRoot->appendChild(new DomElement('file', $fullpath)); } else if ($recursive) { $project = new DomElement('project'); $project->setAttribute('name', $file); directory2xml($project, $fullpath, $recursive, $ignore); } } } $dom = new DomDocument('1.0', 'ISO-8859-1'); $root = $dom->appendChild($dom->createElement('structure')); directory2xml($root, realpath('path/to/directory'), true, array('cgi-bin')); print $dom->saveXml();
  20. function directory2xml(&$xmlRoot, $directory, $recursive = true, $ignore = array()) { if (!is_dir($directory) || !is_readable($directory)) return false; $files = scandir($directory); foreach ($files as $file) { if ('.' === $file[0] || in_array($file, $ignore)) continue; $fullpath = implode(DIRECTORY_SEPARATOR, array($directory, $file)); if (is_file($fullpath)) { $xmlRoot->appendChild($xmlRoot->createElement('file', $fullpath)); } else if ($recursive) { $project = $xmlRoot->createElement('project'); $project->setAttribute('name', $file); directory2xml($project, $fullpath, $recursive, $ignore); } } } $dom = new DomDocument('1.0', 'ISO-8859-1'); $root = $dom->appendChild($dom->createElement('structure')); directory2xml($root, realpath('path/to/directory'), true, array('cgi-bin')); print $dom->saveXml();
  21. Wrong. It's: TRUNCATE TABLE tableName
  22. It's not Java but JavaScript like PHP it's a scripting language (meaning it's syntax is interpreted and not translated like Java or C). You can find a few js scripts even frameworks (like jQuery) that allow you to re-order list items.
  23. Dan had je het wel even in het engels kunnen zetten
  24. If that contains the html code then yes.
  25. Use DOMDocument it's much easier and can be used in a recursive function when the function is done you just $dom->saveXml();
×
×
  • 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.