Modify your registerform() function to include die() after you echo your response. Example:
function registerform(){
echo $_POST['name'];
die();
}
add_action('wp_ajax_registerform', 'registerform');
add_action('wp_ajax_nopriv_registerform', 'registerform');
Related Posts:
- How to include checkbox in widget backend form?
- Upgrading PHP version results in “Use of undefined constant WP_CONTENT_DIR” warning?
- How to hide get_theme_mod if field empty
- renaming an admin menu item with decimal array index number
- How to get the original price of the product in woocommerce?
- How to make sure that only one wp_cron() runs at a time?
- How to add 2 posts under another post? Formatting should be intact
- Can’t Find a Way to Edit the Home Page Content [closed]
- Fatal error: Call to undefined function wpsc_cart_item_count()
- No wp-config.php file on local install of wordpress – site still displays
- Widgets not showing in my custom theme
- Edit category output
- Woocommerce Custom CSV export
- integrating external php library into wordpress- the right way
- To echo or not to echo?
- Add a Different CSS Class Into The Body Tag of Different WP Pages
- How to limit the content coming from wordpress shortcodes?
- What is the fastest way to load PHP functions that are only used in one theme template?
- Writing scripts using WordPress / WooCommerce classes?
- storing wp_head in a variable?
- Asking popup for delete post in WordPress [closed]
- Change description on specific WooCommerce product status change
- How do I attach a php file to an arbitrary slug and still have access to the wp-core functions?
- Trouble creating conditional PHP for nav menu items with children for custom Walker
- Woocommerce redirect thankyou page based on product ID doesn’t empty Cart
- How to deal with checkboxes in edit page?
- Must I download entire WP directory for each separate instance/website that uses WP?
- search and replace preword from author
- Add meta noindex to post if it has a specific taxonomy
- Displaying Hierarchical custom taxonomy
- Open post-content in archive page in a Modal box with bootstrap
- Creating own shortcode – echoeing php variable based on JS variable
- How do I Turn This Into An if statement?
- Sort meta-value in the sequence array in pre_get_post
- How do I link a button I created in theme customizer to a function?
- Make PHP work with HTML tags
- Which is the correct way to conditionally enqueue a CSS file?
- how to remove colon and white space in a string by php
- Filtering a Database Query
- Tell WP register script to load a script only when the entire page is loaded
- anyway to put inside a $outprint=sprintf()
- Can’t save php string to a custom field
- What does $_GET[‘iphone’] do?
- Appended comments but they show up above the content instead of below
- get_template_directory adding FTP root folders in urls
- Shortcode not staying inside div tag
- HTML showing after PHP code in tag
- Login redirect. Check user meta and redirect accordingly
- Adding Author Box Meta Links with Co-Authors
- Lost in trying to create user database system
- Local WordPress with WAMP downloads files out of Nowhere
- Remove   from the_excerpt
- Why is my max_upload_filesize being limited to 2M? [duplicate]
- Errors being created by admin-ajax.php
- Limit tags shown in post
- Can’t pass the variable from a select to PHP query
- Unexpected token ILLEGAL, even on clean install – jquery-issue?
- “if parent category is” conditional?
- Deactivate a plugin on wp version
- Ajaxurl suddenly not defined
- the_post_thumbnail issues
- linked php file not executing php
- Some problems calling a function into sprintf() inside functions.php template file [closed]
- Add other class content with reference class value
- how can i update my postmeta without losing old data?
- Programmatically add a product to the cart and set price to zero when buying from certain category
- I want to show cart items number if any or nothing, simple CART text
- Slug duplicates once clicking on link
- Find and print first entry from WordPress post in custom excerpt?
- Language does not switch while cache is enabled
- How can I update the price when someone enters postcode or zip code in woocommerce checkout page?
- Limit content size by character or word in database
- String replace for Login/Logout concatenation problem in menu
- PHP call_user_func_array() error
- Redirect after login depending on the URL
- Set user status to absent on WordPress
- Customizer: How to Sanitize a Decimal Number Range
- Switch position of elements in the footer [closed]
- Displaying POST content with HTML tags and all
- Problem with ajax request and directory structure after site migration
- WordPress 3.0 PHP Error – notice WordPress_product_Type was called incorrectly
- Retrieving specific images from Media Library
- Access methods in plugin template
- WordPress HTML Helper
- Adding unique marketing messages between certain products whilst using isotope/Infinite Scroll
- Notice: Undefined index: fix with isset [closed]
- Include administrator in author list
- Pass php to database in JQuery: With AJAX?
- List sibling pages widget, exclude current page
- Amending PHP for WordPress Theme
- get_permalink returning first letter
- Path for contact form file
- File Upload with Server in safe_mode
- WP plugin updates [duplicate]
- Custom Archive Page
- Load files content [closed]
- Shortcode for Visual Composer Grid fails turning string to integer
- How to initialise WP_Query on the basis of a specific meta_value and continue iterating rest?
- Custom Post Type doesn’t have template content when creating programmatically in PHP but does when created in WP Admin
- How can add alt tag in following code. Image are showing dynamic in wordpress