Your conditional check is the wrong way around, it should be >
not <
.
But more importantly, why are you doing a raw SQL query at all, just use the standard functions, e.g. get_user_by
:
$user = get_user_by( 'email', $email );
if ( !$user ) {
// there is no user with that email
}
Also, submit
is an incredibly generic name for a form input to check, use something more specific, like av_email_cform_submit
.
You can also replace your action="' . esc_url( $_SERVER['REQUEST_URI'] ) . '"
with action=""
. You also have a double <p><p>
in your form.
Related Posts:
- Contact form 7 select box different value-text than content-text in option [closed]
- Let readers suggest edits from the frontend
- Where should my plugin POST to?
- Plugin development: how to create a form and get custom data?
- WordPress widget / plugin….fields not appearing in my widget
- Multi step form, custom plugin
- shortcode doesn’t work
- Contact Form 7 plugin refreshing page on submit [closed]
- Template plugin for blog posts? [closed]
- Plugin form unable to process
- WordPress Custom Application form
- Datepicker not supporting timepicker
- Is there any good tutorial to write custom login, registration and password recovery forms? [closed]
- WordPress plugin form not saving data
- Admin page: form with enctype=”multipart/form-data” does not transfer its data
- jQuery Plugin to use WordPress functions in AJAX request
- Add form fields dynamically on button click
- How to trigger $_GET request within admin plugin page?
- Retrieving a Value from a wp-database
- Custom CSS for plugin form
- Form doesn’t submit on second submit call
- WP plugins for building a database?
- Custom form action to handle data inside a plugin
- Form isn’t inserting data into database with ajax plugin
- Image upload and other options in the same plugin settings form?
- When using Simple Fields plugin, how do I pull the information out of the database to display on a page?
- Creating an online questionnaire form – by Importing the questions from a spreadsheet?
- Can I use custom CSS and js plugin to put JavaScript in to validate my forms
- Using a custom plugin to capture input data via Ajax and PHP
- auto populate list of questions if user select a category xyz
- WordPress WPforms customization
- Submit page limited in time to upload image
- Adapt PHP form action for WordPress?
- Ajax fail and get 504 error
- How to insert HTML/JavaScript form into WordPress page? [closed]
- How do I make a child theme I made POST through a 3rd party plugin?
- How to fetch form data and show it to my page?
- Submit custom form from post content and execute in plugin
- Char limit on custom blog-post form? [closed]
- Is there a way to embed a Google Docs form in a page without using plugins?
- easy steps to make front end form without plugin
- Form that generates an ID for the customer
- Submit Form data to another page via Ajax (WordPress Way)
- WordPress checkbox and Illegal string offset
- Editing a text file from plugin menu
- Ajax Plugin Not Echoing Response
- Plugin that will output submitted form data for user? [closed]
- How to handle forms from sidebar widgets – Processing $_POST variables using get_field_name()
- How do I add the same contact form to multiple wordpress sites and capture the response in one place or database?
- coding a WordPress AJAX Form using PHP to check if User is Logged Out and Show error
- Creating a form and displaying entry data as a table
- Gravity Forms returns to odd position
- Storing The Data Collected by Ninja Forms into Another (custom) Database [closed]
- WordPress Multi-Step Product Search
- add_meta_box creating default form field types
- Form Plugin for Api Requests which is used via Shortcode
- Echo out element to another page.
- Select Form Element Not Saving from Plugin Options
- Storing Form data in a different database
- Contact Form 7 “non-selectable” options in a drop down [closed]
- Using AJAX to run SQL statement and populate dropdown
- How to append new form elements in “Add New” form of Users in WordPress admin panel?
- Looking for a simple checkout plugin [closed]
- Redirect plugin after form submit or show errors
- Linking form to user meta fields
- get wpforms ID value from ACF text field
- User loggedin as Subscriber form not sending
- WordPress – send digital product with custom email
- How to create a form where you can select multiple recipients, based on a list of website users?
- WordPress search input in database, to edit information via form and update the database
- WPForms Custom Redirect not working
- Submitting form to PHP
- How can I implement radio buttons with icons in Contact form 7?
- Hide button after form submit and save state to localstorage
- Meta Key array building with multiple input values from fields
- Creating posts with acf_form() that has a relationship type field
- Plugin to manage form submissions on admin panel
- submit form data to wordpress existing database table using my plugin
- Page takes on two different formats
- get/show Last ID
- WP_Filesystem usage within a block of code
- Is there a function to search for a wildcard value when calling a shortcode?
- Create user assessment and use results in sql query
- Saving custom form fields
- Adding a Filter to Sidbar Login Plugin to Change Login Button Lable
- Create plugin with form in post and submit it to specific form
- Link Forms on WordPress
- Capturing POST data
- Is there a way to add a custom input field for every taxonomy term in WP post editor?
- Undefined variable _POST
- Plugin Admin Page Ajax-Admin call returning 0, URL set correctly. Implemented localized scripts but did not fix it
- How to prevent page load on form submission
- How to develop an extension for a simple form post and post back? [closed]
- Plugin Beauty Contact Popup Form with while loop
- Build a Boat Form Plugin [closed]
- Is it possible to set different payment gateway on each Gravity Forms form? [closed]
- Redirecting to page on form submit – Revue plugin
- WP Donation Form with custom payment API
- Form with response button after on table after submission
- Display file contents within Plugin