Jump to content

Zane

Administrators
  • Posts

    4,362
  • Joined

  • Last visited

  • Days Won

    11

Everything posted by Zane

  1. You're missing a concatenation period in between WHERE " ... and join( You are seeing Hello Array because $_POST['activity'] is an array... as Barrand suggested you did.
  2. You create an RSS feed that is fetched by your template. Otherwise, you would need DB, FTP, or SSH access to their servers which I doubt your members are going to entertain.
  3. Just strtolower() $filename foreach ($_FILES as $file) { $fileName = strtolower($file['name']);
  4. If that is all you need it for then disregard my integrity statement.
  5. If you only want 8 characters then use substr echo substr( md5("password"), 0, ;  Keep in mind though, this will lower the integrity of your hashes by a long shot.
  6. try adding the word "week" in there echo date('Y-m-j', strtotime('Monday+'. $i . ' week')).'<br />';
  7. What does your current attempt look like?
  8. This is one of the many many reasons to learn jQuery. The change() function provided by jQuery should cover every aspect of it being changed.. whether you used the keyboard of mouse. You may also want to check out this answer for cross-browser support so the keyboard change works all of the time http://stackoverflow.com/a/12401844/401299
  9. IF a field is not required in your form, then that field in the database should be set to allow NULLs.. As for your idea of checking for optionals... It looks good to me.. but I would make use of the null keyword.. and use a ternary operator $optionalOne = isset($_POST['optionalOne']) ? $_POST['optionalOne'] : null; $optionalTwo = isset($_POST['optionalTwo']) ? $_POST['optionalTwo'] : null; $optionalThree = isset($_POST['optionalThree']) ? $_POST['optionalThree'] : null; Then, you can have a full INSERT statement with all 100 fields in it. Anything that is optional and is not filled out will go into the database as null.
  10. The key to accomplishing something like this is to populate every row with every vital piece of info needed to find it in the database. Additionally, the use of jQuery's (Javascript) AJAX functions can make this tremendously easier if you aren't doing that already. Anyway, When you are populating this table that you showed in your screenshot, you would insert the vital info in the source code of that table. <tr class="user" data-id="1234"> <td><input type='text' name='username' value='zane'/></td> <td><input type='text' name='email' value='zane@domain.com'/></td> </tr> Given the above format, we can use jQuery to extract certain info and send that data to an external PHP script upon changing the text box value.... or however you want to trigger the change. $("tr.user input").change(function() { var $userid = $(this).parent("tr.user").data('id'); $field = $(this).attr('name'); $newVal = $(this).val(); var update = $.ajax({ url: "script.php", type: "POST", data: {table : "users", id : userid, field : field, newVal : newVal} }); }); Then, on your script.php page you can find this information in POST and do with it what you will. None of this code is tested... it is simply an off the top of my head suggestion.
  11. The URL went nowhere anyway.. I checked it out, what was the fuss about?
  12. I would do as Barrand suggested yet add the lineItems key to it. $i = 1; foreach($Order->Cart->contents as $Item) { $lineItems['lineItems'][] = array ( 'itemId' => $i++, 'name' => $Item->name, 'quantity' => $Item->quantity, 'unitPrice' => $Item->unitprice ); } $whatYouWant = var_export($lineItems, 1);
  13. On Wordpress.org, there is a download button. There is the difference.
  14. Never figured VARCHAR would do that. Learn something new everyday.
  15. column3 and column4 MUST be in a numerical format like INT or FLOAT in order for that comparison to work.
  16. I am taking a shot in the dark here, but maybe this is what you are wanting? $data = array(); while($r = mysql_fetch_array($query)) { $k = $r['id']; $data[$k] = $r; }
  17. value 1 = 19 value 2 = 33 value 3 = 12 value 4 = 5 value 5 = 129 ----------------------------- total = 198 value 1 = (19 / total) * 100 = 9.6% value 2 = (33 / total) * 100 = X% value 3 = (12 / total * 100 = value 4 = ......... value 5 = ..........................
  18. Lemme show ya saumthin'

  19. Here ya go. http://www.sitepoint.com/forums/showthread.php?530093-Regex-Help&p=3713338#post3713338
  20. Well first off, where is this $row variable created? Not to mention $result[0]... You ask for help with debugging yet you do not provide all the relevant code. That's like taking out your car's alternator.. bringing it to the mechanic and saying "My car just won't start.. why not?"
  21. It is possible, but doing so would require the editing of operating system files. You would have to append something to the OS functions for file traversing/copying/deleting/etc... that triggers a php script to execute as a command in the background. I myself have no idea where to even begin doing such a thing, but editing the OS files is definitely where you would sniff around.... and that could have hazardous effects if you do not know what you are doing. Surely there is some software out there that can keep up with your file modification actions so that you don't have to risk your OS.
  22. You can't just expect us to look at this and figure out what your problem is. You've made it apparent that you want to show a captcha after 3 failed login attempts, but it would make things move smoother for everyone if you pointed out what is or is not doing correctly?
  23. PHP's DOMDocument class is the most effective method for scraping... unless of course you just LOOOVE regex that much... I would imagine not. Something like this should get you started $doc = new DOMDocument(); libxml_use_internal_errors(true); $doc->load('http://somewebsitepage.wtf'); $xpath = new DOMXPath($doc); $nodes = $xpath->query("//div[@class='ProductPageNav'/a"); foreach ($nodes as $node) { echo $node->nodeValue(); }
×
×
  • 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.