Jump to content

shlumph

Members
  • Posts

    575
  • Joined

  • Last visited

Everything posted by shlumph

  1. Oh ok. Yes, you'll need them in the database first, before you display them Depending on if the recipe is already in the database or not, you'll need to either UPDATE or INSERT. Is the recipe already in the database when submitting the image?
  2. Your upload script does not insert the images file location into the recipes table. Unless you left that out?
  3. Are you asking for help in regards to inserting the image's reference in the database? That looks like an upload script.
  4. I think you have mistyped your INSERT query. I count 4 ('s and only 3 )'s.
  5. Remove the "of", and it should work. Also, mini versions are important. There may be differences between 5.2.1 and 5.2.17.
  6. Does not return false: strtotime("last Monday May 2012"); Does return false: strtotime("last Monday of May 2012"); At least in PHP 5.2.17... 5.3.X is different, and both will work.
  7. You need to do some debugging. Do you get a row back when you run the same query in MySQL editor? Does this trigger an error? (Make sure display_errors is turned on in your php configuration) $check = mysql_query("SELECT login FROM db_login WHERE login=\"$email\"") or trigger_error(mysql_error());
  8. To expand on this even more; there is a limitation on the number of "nodes" you can have in a certain directory. This number is much greater in ext4 filesystems than ext3, but still something you never want to reach.
  9. I mean: echo "<a href='https://www.mysupplier.com/item/item.lasso?dsc2={$row['supplier_reference']}'>{$row['supplier_reference']}</a><br />";
  10. You only need to echo once, since you're concatenating the string. You also need to quote your href attribute, and put text between the opening and closing of the tag. I believe you meant this: echo "<a href='https://www.mysupplier.com/item/item.lasso?dsc2=" . $row['supplier_reference'] . "'>" . $row['supplier_reference'] ."</a><br />"; Or, simply: echo "<a href='[url="https://www.mysupplier.com/item/item.lasso?dsc2={$row"]https://www.mysuppli...asso?dsc2={$row[/url]['supplier_reference']}'>{$row['supplier_reference']}</a><br />";
  11. You could also consider using INTERSECT: SELECT id FROM table_1 INTERSECT SELECT id FROM table_2
  12. Assuming that the session data is set, you are assigning those variables incorrectly. I believe you meant this: $itemId = $_SESSION["cart_array"]["item_id"]; $qty = $_SESSION["cart_array"]["quantity"]; Also, in your query, $itemid should be $itemId, as variable names are case sensitive. Hopefully this gets you on the right track. And don't forget to include session_start(); at the beginning of your scripts that are making use of sessions.
  13. Rename it when you move it. move_uploaded_file($_FILES["image"]["tmp_name"],"../img/ga/newFileName.ext");
  14. What OS are your servers? As mentioned, this isn't related to PHP. And load balancing clusters can be very complex. I would suggest looking up high availability / clustering software to install on your servers.
  15. Can't say I've ever tried it under Ubuntu, but NetBeans has MySQL support: http://netbeans.org/kb/articles/mysql.html (old article, but you can catch the drift from the videos) I'm pretty sure Eclipse has MySQL integration too.
  16. I would actually create a flag in your $options (beforeSave()), whether or not to hash the password. Depending on what action you're on, and whether the user is authorized or not, you should be able to know if you need to hash the password or not. Changing the view to work around this is kind of hackish, in my humble opinion.
  17. Store it in a database, but when pulling data check the cache first. When a user adds a new menu item, destroy the cache, pull from the database, and then store that data in cache for future lookups. Is this what you're looking to do? There are plenty of caching systems, besides memcache. You could even just write the serialized data to a file. This is what I did on my blog: (code)
  18. I would make heavy use of division and the modulus operator, if writing the implementation from scratch http://php.net/manual/en/language.operators.arithmetic.php
  19. That's what I'm suspecting, too. Try this: <?php function photo_history_bypaths($courriel) { $table = "_files"; $courriel = trim($courriel); $sql =mysql_query("SELECT img_name FROM $table WHERE email = '$courriel'AND ok = '1' ORDER BY id DESC LIMIT 0 , 3") or die("&erreur=Échec de la requête !"); $rows = mysql_num_rows($sql); //Only call this function once, before using mysql_fetch_array if ( $rows > 0) { while ($row =mysql_fetch_array ($sql)) { $flashstr .= $row['img_name']."|"; } print "&erreur="."&nombre=".$rows."&liste=".$flashstr; } else { print "&erreur=Pas de photos présentes pour cet utilisateur."; } } ?>
  20. You don't have to use OOP to make your code reusable, more clear, and easier to maintain. I would encapsulate a lot of what you have into functions. You could also consider getting rid of the loops, and using recursion.
  21. Figured. Well, it looks like Authorize.net might actually be the better option for me, then. At the time, PayPal Payments Pro: Setup: $0.00 Monthly Fee: $30.00 Transaction Fee: 2.9% + $0.30 Authorize.net: Setup: $99.00 Monthly Fee: $20.00 Transaction Fee: $0.10 Although PayPal does include options like fraud protection, recurring billing, etc. with those prices. Costs more to add those in Authorize.net. So, I'll have to think about this. Any other reputable payment gateways I can look into?
  22. I'd like to create an application where a user can fund an account. When a user does a certain task, they will get a certain amount of their money back. If they complete all their tasks, over time, they will get all of their money back. Any suggestions as to which payment gateway to use for this? I am nervous about getting hit with a ton of transaction fees. I am thinking I could use PayPal Payments Pro so that the user can fund their account with a credit card. Whenever they complete a task, I could issue a partial refund, which would go back against their credit card. Can I even issue multiple partial refunds on the same transaction ID, though? I'm not sure. And I also don't want a bunch of transaction fees on those refunds. Maybe there is a gateway out there which would only charge a transaction fee on the original transaction? I'm thinking about changing the design. A user funds their account with their credit card, and then once they complete ALL tasks, I can issue a single refund. This would avoid the many transaction fees associated with issuing a refund per task. But in order for this to be a successful app, I think the user should get a % of their money back right away after completing each task. Any advice on which Payment Gateway to use for this? Advice, or design considerations?
  23. Make sure you understand regex. If your teacher hasn't covered it in class yet, he's going to ask how you knew to use it, and what it does.
  24. I think it looks great and don't have much more feedback than what was already said. However, I do pronounce it "Kit - Hell" in my head. Sorry if that's your last name, or something. But similar to how facebook dropped "The", I think you should drop the last "L". Kithel.
  25. The search box itself is built with CSS, using image sprites. I can't really tell if this is what you're asking. But basically, the form is wrapped with a div with this background: And then the button itself has this as a background: Then depending on the state of the button/form, the background's Y offset is adjusted.
×
×
  • 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.