You’re using a placeholder (“%s”) in your SQL for prepare, but you don’t pass it a value to put in place of that placeholder, hence the complaint.
use $wpdb->prepare("SELECT ... %s", $myvalue)
And I’m pretty sure your other error stems from you passing in a DateTime object. $wpdb will not convert that automatically, it expects strings, which it then passes to mysql_real_escape_string()
(or mysqli_real_escape_string()
depending on what the connection is set up with).
Side note: you might want to overthink using special chars in variable names. If somebody who doesn’t use your language’s keyboard layout ever needs to edit that script, he’ll have a fun time copy pasting æ
in variables 🙂
Related Posts:
- How to define form action in JSF?
- How to display user registration form on front-end of the website?
- Creating a contact form without a plugin [closed]
- How to submit data from HTML form?
- Can I verify nonce which was generated on a different WP site?
- Sending form data via PHPMailer – How to action PHP script from a form
- how to handle forms in multiple pages?
- recommended practice for form submission
- Built-in data validation function for URLs
- Gravity Forms skip form if already filled out using cookie?
- One comment per user per post
- Trying to save and display a wp_editor()
- Contact forms going into spam folder
- Using the WordPress selected() function
- Return to option page after running PHP script
- Stripe Error: must provide source or customer [closed]
- How to submit form in a PHP file in WordPress?
- CRUD front end for mySQL in WordPress
- How to prevent page from resubmit on refresh when “Cannot modify header information – headers” warning shows
- How to edit custom user meta information front end
- How to redirect new WordPress user to previous page after registering
- Google Map Latitude and Longitude values in form
- How to properly add a custom submenu to the user’s admin menu
- How can I find actual logic php file in form’s action path?
- WordPress form to shortcode
- Create Contact7 Form programmatically [closed]
- recaptcha working on local but not on live wordpress sites [closed]
- User input form field value validation ninja forms 3
- Creating a contact form with Laravel frontend
- Using form parameters within a WordPress “Page”
- Make a form that will send email to all the authors in selected category [closed]
- Can I make Contact Form 7 change over to a new page? [closed]
- How dynamically change wp_mail behaviour, sending html or plain text based on conditions?
- A mandatory agreement form to access another page?
- Creating short code for search form
- textarea field is getting escaped for some unknown reason
- Problem in getting Value through POST method after Login
- Where to add css file that I want my forms to use?
- Downloadable content only for subscribers?
- how to add a custom form in a page
- How to Collect Keyword and Search Engine Data on Webforms?
- Create a registration form with a PayPal checkout fee? [closed]
- free form wordpress
- comment form name and email not working?
- Sort populated GravityForms list alphabetically [closed]
- form action wordpress and php
- Checkboxes in a wordpress form are not showing as checked when selected [closed]
- Radio&Checkbox buttons Contact form 7 not clickable
- WordPress Emails & Contact Forms [closed]
- How to move HTML form to WP Theme
- Is there a reset_button()?
- How can I modify labels in default wordpress registration form? [duplicate]
- Display number of sign-ups [closed]
- Contact form submit, having to click twice
- Form within thickbox
- WPDB secure custom form
- Restore Cforms II Form Presets
- Getting value from database table depending on field value
- Making an input field required from WP’s perspective
- How to take large file uploads from users the right way
- Cannot modify header form resubmits data on refresh
- wordpress forms submit
- wordpress blog, is there a way to make anyone post in a blog without having login info
- gravityform – retrieve multiple check answers “keys” instead of “values”
- Code for front end validation for forms not working
- using esc_html_e string in custom form using code snippets
- How do I implement form handling when form is custom HTML?
- Forms cut off when on mobile
- How to create a custom range slider in wordpress form?
- Sorting wordpress data in excel
- Quickly Maintain/edit 100+ WordPress Forms on multiple websites
- Pricing depending on selected items in a multi step form
- Prevent malicious scripts to be submitted in post
- Help posting values to DB on submit using $wpdb->query
- Sending Form data as Attachment
- Trigger action when submitting form with WPForms [closed]
- Delete comments function
- Form submissions that require users ID# [closed]
- Unable to submit form using admin post wordpress
- Form data from wordpress theme to be submitted in other site url
- Send contact form to a specific referrer-email adres
- wp_nonce for Front-End submission form not working
- Pay before posting (frontend insert post)
- admin_post in object oriented plugin
- Contact form spam, without form?
- How to use the in WP
- How to send form values from the script in functions.php and not from the form on my website?
- How do I capture the selected option and pass in sending the registration form?
- Insert Extra fields added in the front end registration form to DB
- Issue with contact form 7
- Advanced searching form
- Cannot access a file in the theme (twentynineteen-child) folder
- Dropdown List Won’t Display Selected Option After Submit / Refresh
- Adding Mailchimp API key dynamically
- WordPress – custom user flow registration approval
- Gravity form with paypal adon should return custom receipt
- I cannot enter the letter C in the form [closed]
- How to redirect to a page after submitting form data?
- Add options to WordPress Blocks form dropdown field
- Putting form result in my database