Jump to content

CroNiX

Staff Alumni
  • Posts

    1,469
  • Joined

  • Last visited

  • Days Won

    12

Everything posted by CroNiX

  1. How do you know it's not sending anything? Your local_settings.php script doesn't return anything back to the ajax, so data does not contain anything in your success() method. It just sets Session vars on the server.
  2. define('UPLOAD_DIR', 'images/' .$today. '/'); //Check that the dir exists if ( ! file_exists(UPLOAD_DIR)) { //Nope, create it... mkdir(UPLOAD_DIR); } //rest of upload code to move uploaded file to UPLOAD_DIR
  3. Did you try returning $query->posts() like I suggested?
  4. It's not totally necessary, but would help you a lot in understanding what is going on and you'll definitely pick up a OOP framework faster than learning both at the same time.
  5. See how we might be confused?
  6. You said it was "timestamp". Timestamp type in mysql is not in seconds. http://dev.mysql.com/doc/refman/5.5/en/datetime.html
  7. If expire is a mysql timestamp, then it's date is in the format yyyy-mm-dd hh:mm:ss. PHP's time() returns a unix timestamp in seconds, like 1411670005. So this: if($row['expire'] <= time()){ will never be true because you are saying if('2014-09-25 11:35:05' <= 1411670005) so you'd want to compare it to a date in the same format... if($row['expire'] <= date('Y-m-d H:i:s'){
  8. If "student name" is a text field (I assume you mean textarea), then how do you plan on determining the number of students entered into it by the user? It depends on what the user enters...like one name per line (hitting enter after each name), names separated by spaces, names separated by commas. How do you plan on determining how the user entered the student names into that field if it's entirely up to the user?
  9. Or if error_message is supposed to be an array, append it. error_message.push(message.message);
  10. Because you are just replacing the old error message with the new one, so it will only show the last one. Try appending the message... error_message += message.message;
  11. I don't use WP, but you can try this: function my_sermon_query($meta_key, $meta_value) { $query = new WP_Query( array( 'meta_key' => $meta_key, 'meta_value' => $meta_value, 'post_type' => 'mbsb_sermon' ) ); return $query->posts(); }
  12. I've read most of the major distros have updates to fix it. I don't know what's worse...having the actual bug out there for years with few to no one knowing about it or the news telling everyone it exists. Patch fast!
  13. CroNiX

    checkbox

    Checkboxes will only be transmitted if they are actually checked, so just check to see if it isset(). $checked = isset($_POST['inp_vis']);
  14. You are returning the DB object, not the resultset FROM that object.
  15. If 2014-08-20 07:32:20 is coming from a datetime/timestamp/date field in a query, you can also get the month from that using SQL and not use PHP. SELECT MONTH(datetime_field) AS month http://dev.mysql.com/doc/refman/5.6/en/date-and-time-functions.html
  16. https://developers.google.com/maps/documentation/javascript/geocoding Then store the lat/lng in the database for future use so you don't have to keep calling the geocoding service for the same address repeatedly. There are limits on how many hits to the geocoding service you can perform/day.
  17. Yes, the % is a wild card.
  18. Did you read the first reply from Skunkbad? The 2nd link contains what you're after.
  19. Show your new code and post the errors you are getting.
  20. See the difference between requinix's process() code and yours as far as the conditional? His does the check within the process() function.
  21. Like Home Depot, Target, and other huge stores being lax with security? (Or...ignoring them when employees brought it up)
  22. Personally I'd use a js alert() method to display the cancellation policy, or some other javascript modal/overlay. If their browsers settings are blocking popups (most do) they will never see the cancellation policy since it's trying to open a new tab.
  23. Did you check the server logs? I see a syntax error where you are creating the links (missing closing ]): urlencode($data[$j)
  24. What version of jQuery?
  25. javascript+ajax. Using jQuery, it would be as simple as when a form element blurs, use $(form).serialize() and send the data via POST using ajax to a url that would save it.
×
×
  • 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.