Jump to content

Jessica

Staff Alumni
  • Posts

    8,968
  • Joined

  • Last visited

  • Days Won

    41

Everything posted by Jessica

  1. 1 is not a full image url. It's a number...
  2. It doesn't do anything, it's just a string. You don't put the string in a variable or print it out.
  3. http://us2.php.net/foreach The only two valid syntax are listed. foreach($result AS $k=>$v){ '<img src="'.$v['pic_link'].'" /> <br />'; //This line isn't valid code either. }
  4. substr(), explode(), strpos() are functions which you could use.
  5. http://www.google.com/search?q=define:obfuscated+code
  6. It should be 60*5, 5 minutes is 300 seconds. My bad. The timezone doesn't matter, as it's always the same timezone.
  7. Yes, I KNOW what you're trying to do. If you want me to actually write out the entire code, send me the file and $30. Otherwise you're going to have to use what I've said over and over and write it yourself, as I can't explain it anymore. Best of luck.
  8. No, that doesn't make sense, because yes it will. If you select EVERYTHING for the year 2003 AND for the year 2002, then IN PHP you take the figures from 2003 and the figures from 2002 and calculate the increase and decrease. If you need to keep doing this, then just select all of it and us php to loop through the years. Then, once you've got your newly created arrays full of data with increases/decreases, print the HTML.
  9. Change it to an INT and see if it works better? What is the value of $myrow['manager_time'] for the ones you're not expecting to get? Also, what is the value of $inactive? print the sql statement to make sure it's right.
  10. I don't believe PHP can do that.
  11. Get ALL of the data where the year is this one, or the previous, like I posted. Sort it the way I posted. This will make it easiest to order in PHP.
  12. Is the field an integer/timestamp, or a MySQL DATETIME?
  13. So do the calculations in PHP. Now you're trying to subtract one from sales, before it was year. You're not being very clear on what you're trying to do. Select all the data for the stores, then do your math and formatting in PHP.
  14. $fiveMinAgo = time()-(60*60*5); $strQuery = "SELECT * FROM managers WHERE manager_time > $fiveMinAgo ORDER BY manager_time DESC"; $inactive isn't defined, so you're getting where the time > 0.
  15. so ORDER BY unitNum ASC, year ASC Then just play with your HTML formatting till you get it to work dude.
  16. Your original code just gets everything, it doesn't specify a year, week, etc. You need to adapt it to do what you want. If you want all the records from this year and last, my query will get that. If you want all the records from today, this year and last, you need to add more specifics.
  17. print_r($_POST); You may want to add a print '<pre>'; in front to format it nicely.
  18. $sql = "SELECT storeNum, period, week, year, sales, sales, FROM salesData WHERE year = '".date("Y")."' OR year = '".(date("Y")-1)."'"; (I think my quotes are all matching )
  19. PHP is easier to pick up. RoR is touted as being easy, but if you don't know Ruby it's not. Stay away from ColdFusion, we're in the new millenium now
  20. I'd just contact them and explain the problem. Who is your host?
  21. The method of having a single salt and using it in the code itself seems fine, but all the tutorials I've read that mention it have it as a random salt PER user, and the salt is stored in the DB too. That's why it confuses me. I like the idea of only having so many attempts per day, to help stop brute force attacks on the login screen itself. Because the salt doesn't stop those attempts.
  22. *\generator Msftedit What are you using? Just use a text editor.
  23. You have HTML inside your PHP. There is actually no PHP in your <?php tags. Make it plain HTML, not PHP.
  24. Something like this: $mempic = 'images/mugs/mug_'.$u_uid.'.jpg'; if (file_exists($mempic)) { $mempic = '<img src="'.$mempic.'" />'; } else { $mempic = '<img src="images/mugs/MugDefault.jpg" />'; } If it still doesn't work, try using the FULL path in front of images/ - it will be something like www/domain/html/ etc. I can't tell your specific one, you have to know it.
  25. obsidian: But where do you use it? Edit: I guess my question is how does salt stop the dictionary attacks on user's accounts? It seems like it only does any good if the "hacker/cracker" somehow gets access to the database - so the articles that tell you to store the salt per user in the db don't make any sense - if they have access to the password column, they have access to the salt.
×
×
  • 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.