ignace
Moderators-
Posts
6,457 -
Joined
-
Last visited
-
Days Won
26
Everything posted by ignace
-
Link as Submit button. A little problem bugging me
ignace replied to irkevin's topic in PHP Coding Help
You don't and you wouldn't use: if(isset($_POST['submit'])) but: if (!empty($_POST)) -
[SOLVED] Find time between CURENT time and a timestamp in a DB..
ignace replied to lynxus's topic in PHP Coding Help
SELECT * FROM table WHERE time1 BETWEEN time2 AND now() -
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.
-
if ($maximum_count > 150) { return ''; }
-
$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!
-
Besides if you are using work from someone else shouldn't you need to be crediting them?
-
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?
-
Assigning/arranging relational numbers to an array
ignace replied to blargalarg's topic in PHP Coding Help
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/ -
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.
-
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
-
[SOLVED] PHP MYSQL How To Page Break After 2 Rows
ignace replied to kirisutegomen's topic in PHP Coding Help
if (0 === ($i % 2)) { echo '<br>'; } echo '<span>' . $record . '</span>'; -
1. ORDER BY month(timestamp) 2. WHERE month(now()) = month(timestamp)
-
Image script works on one server, fails on other
ignace replied to roel018's topic in PHP Coding Help
output_buffering is PHP_INI_PERDIR so you can by using a .htaccess alter the buffer to 0 -
And then we aren't yet talking about variable hours or lunch time?
-
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
-
Then how do you know that what I said was in Dutch?
-
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.
-
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();
-
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();
-
Wrong. It's: TRUNCATE TABLE tableName
-
Assigning/arranging relational numbers to an array
ignace replied to blargalarg's topic in PHP Coding Help
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. -
Dan had je het wel even in het engels kunnen zetten
-
If that contains the html code then yes.
-
Use DOMDocument it's much easier and can be used in a recursive function when the function is done you just $dom->saveXml();