Jump to content

Ken2k7

Members
  • Posts

    5,196
  • Joined

  • Last visited

    Never

Everything posted by Ken2k7

  1. Thanks for telling us that now. >_> One thing you can do is make it static. Another thing you can do is store a session var.
  2. Well, in that die statement, you can have it print out the value of $this->var_err. That would eliminate any doubts whether or not that statement works.
  3. The variable $msg_error is only set after you submit the form. Before then, it's undefined. If you want, move it outside the if statement.
  4. I think you'll need to post up more code.
  5. Well, that's for sure, but there's so much red text that it's all a blur. If you read the Forum DOs section, it tells you how to post code the correct way.
  6. If that's the case, before the if statement in your error function, put this: $this->var_err = true; Then if error() returns 'error' then your if conditional in your upload_image function is false. Did you even check if the if statement runs as expected?
  7. Calm down. You didn't even follow the instructions of the last 2 posters. You need to wrap those $_POST values in single quotes.
  8. Are the rows the exact same? Do you only need to select a certain column? Because to GROUP or use DISTINCT, the rest of the column data may not be what you want.
  9. How can your function error() return false? It returns a string. As for the if statement, are you sure the "some condition" is true?
  10. Well, if you want to hide it, you can just use a simple CSS rule. Otherwise, you can use: preg_replace('#<td class="vertTh">.+?</td>#i', '', $str);
  11. Yes, that should work. It's the same concept yperevoznikov posted. It's basic math really. Either you add 12 hours to last_voted or you subtract 12 hours from the current date.
  12. What's the error? It's always helpful to post up the errors. That avoids having us ask for the errors and waste an extra one post.
  13. *sigh* Please don't make me repeat myself 3 times. Did you try the function I wrote? That should have removed all non-digit characters. Of course, I don't know if that is sufficient. Maybe you just want those specific 10 digits. Either post the updated code that's not working or tell me what happens after you used the function I wrote.
  14. What is up with the red text? Read the rules, especially the Forum DOs section. http://www.phpfreaks.com/page/rules-and-terms-of-service
  15. I think you need to read up on arrays. $_POST['interest'] is an array of values.
  16. I would use AJAX. Have it pull up a PHP file that returns some JSON data about the acv of the player. Then have JavaScript take it from there for all the subtraction. After all is done, send an AJAX request back to a PHP file to update the results.
  17. Ever Googled? http://www.w3schools.com/TAGS/tag_td.asp Looks like it does. lol
  18. Please read the rules, particularly #4 of Forum DOs. http://www.phpfreaks.com/page/rules-and-terms-of-service
  19. I'm curious as to why you would need to do that. You can do subtraction math with just JavaScript?
  20. You're trying to select something that's not there?
  21. That's not what I'm talking about. I'm talking about that the string " 1800281000" has 73 characters. Did you delete some? If not, then it contains some special characters and not just numbers. ...
  22. Well, here's a function that takes an array of words and returns non-duplicates to your specifications. function noDupes (arr) { var tmp = new Array(), results = new Array(); for (var m = arr.length - 1; m > -1; m--) { if (tmp[arr[m]] === undefined) tmp[arr[m]] = 1; else tmp[arr[m]] = undefined; } for (var t in tmp) { if (t !== undefined) results.push(t); } return results; } var e = noDupes(new Array("the", "and", "to", "where", "and", "the")); Your job is to create the array. I won't help with that. Seems trivial enough.
  23. Have you tried my code? Could you explain why it doesn't work or what it's doing that's wrong?
  24. I think so. What are the results you get back?
  25. Something's obviously off when you see this: [0]=> string(73) " 1800281000" How could there be 73 characters in that strings. There must be some other characters there. Can you post the updated code?
×
×
  • 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.