Title: Error in code using wp_nonce_field incorrectly
Last modified: May 31, 2019

---

# Error in code using wp_nonce_field incorrectly

 *  [drtonyb](https://wordpress.org/support/users/drtonyb/)
 * (@drtonyb)
 * [7 years ago](https://wordpress.org/support/topic/error-in-code-using-wp_nonce_field-incorrectly/)
 * A coding error in check-email.php on line 178 is causing invalid html to be output.
 * The problem is using the function wp_nonce_field( ‘checkemail’ ) concatenated
   in a string.
 * wp_nonce_field( ‘checkemail’ ) already ‘echos’, outputing directly into the stream,
   so you cannot use it like this:
 *     ```
       	<input type="submit" name="checkemail_go" id="checkemail_go" class="button-primary" value="' . __( "Send test email", "check-email" ) . '" /></p>
       	' . wp_nonce_field( 'checkemail' ) . '
       	</form>
       ```
   
 * Needs to be changed to:
 *     ```
       	<input type="submit" name="checkemail_go" id="checkemail_go" class="button-primary" value="' . __( "Send test email", "check-email" ) . '" /></p>';
       	wp_nonce_field( 'checkemail' );
       	echo '</form>
       ```
   

The topic ‘Error in code using wp_nonce_field incorrectly’ is closed to new replies.

 * ![](https://ps.w.org/check-email/assets/icon-256x256.png?rev=2691797)
 * [Check & Log Email - Easy Email Testing & Mail logging](https://wordpress.org/plugins/check-email/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/check-email/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/check-email/)
 * [Active Topics](https://wordpress.org/support/plugin/check-email/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/check-email/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/check-email/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [drtonyb](https://wordpress.org/support/users/drtonyb/)
 * Last activity: [7 years ago](https://wordpress.org/support/topic/error-in-code-using-wp_nonce_field-incorrectly/)
 * Status: not resolved