Title: filtering between $_POST dates
Last modified: February 27, 2017

---

# filtering between $_POST dates

 *  [MikeKJ](https://wordpress.org/support/users/mikekj/)
 * (@mikekj)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/filtering-between-_post-dates/)
 * From a form input
    <label>Date From?<input name=”avail” type=”text”>(yyyy-mm-
   dd)</label> <label>Date To?<input name=”avto” type=”text”>(yyyy-mm-dd)</label
   >
 * Using this as a shortcode
    echo do_shortcode(‘[cfdb-table form=”Initial Application”
   filter=”strtotime(Available-From) >= strtotime($_POST(avail))&&strtotime(Available_To)
   <= strtotime($_POST(avto))”]’);
 * I get
 * div’).each( function () { $(this).html(‘‘ + $(this).html() + ‘‘); }) })(jQuery);
 * Looked at [https://cfdbplugin.com/?page_id=89#filter](https://cfdbplugin.com/?page_id=89#filter)
   and [https://cfdbplugin.com/?page_id=1195](https://cfdbplugin.com/?page_id=1195)
   and I can’t see anything wrong with the shortcode, the database fieldnames are
   correct, can you advise me what I have screwed up please?

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [Michael Simpson](https://wordpress.org/support/users/msimpson/)
 * (@msimpson)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/filtering-between-_post-dates/#post-8875945)
 * Take out all the spaces around <= and =>
 *  Thread Starter [MikeKJ](https://wordpress.org/support/users/mikekj/)
 * (@mikekj)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/filtering-between-_post-dates/#post-8878354)
 * Hi Michael, took out the spaces and changed it to
    echo do_shortcode(‘[cfdb-table
   form=”Initial Application” filter=”strtotime(Available-From)>=strtotime($_POST(
   avail))&&strtotime(Available_To)<=strtotime($_POST(avto))”]’);
 * but I am still getting
    div’).each( function () { $(this).html(‘‘ + $(this).html()
   + ‘‘); }) })(jQuery);
 *  Plugin Author [Michael Simpson](https://wordpress.org/support/users/msimpson/)
 * (@msimpson)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/filtering-between-_post-dates/#post-8881648)
 * That last line is Javascript code but [cfdb-table] does not output Javascript.
   I don’t know how you are generating that output.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘filtering between $_POST dates’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/contact-form-7-to-database-extension_ffffff.
   svg)
 * [Contact Form DB](https://wordpress.org/plugins/contact-form-7-to-database-extension/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/contact-form-7-to-database-extension/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/contact-form-7-to-database-extension/)
 * [Active Topics](https://wordpress.org/support/plugin/contact-form-7-to-database-extension/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/contact-form-7-to-database-extension/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/contact-form-7-to-database-extension/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Michael Simpson](https://wordpress.org/support/users/msimpson/)
 * Last activity: [9 years, 2 months ago](https://wordpress.org/support/topic/filtering-between-_post-dates/#post-8881648)
 * Status: not resolved