Tag Info

Hot answers tagged

1

The nonce field is not added to the form, and is therefore not passed in the POST request when submitting the form. Thus, isset( $_POST['post_nonce_field'] ) returns false and the conditional is never true. Try moving the nonce field to someplace between the opening form tag ( <form>) and closing form tag (</form>). EDIT: The problem is actually ...


1

Wordpress has a generic handler to deal with all forms - admin-post.php. If you include a hidden field in your form called action, you can then hook in to a function of your choice with all the goodness of wordpress included. echo "<form action='".get_admin_url()."admin-post.php' method='post'>"; echo "<input type='hidden' name='action' ...


1

I tried your suggestion and only needed to make a small adjustment... removing the "{" and worked the code looked like this <option value="<?php echo $country; ?>" <?php if ($country == Brasil) echo 'selected="selected" ';?>><?php echo $country; ?></option> thank you!


1

This has nothing to do with caching, but with form auto-completion. It is happening because the browser is set to store form content. To avoid this, you should generate a random code and add it to the name attribute of your input tags. Then send the random generated number trough another hidden input so you can retrieve the data on the other side.


1

If you plan to use it just for your own code, and have it running alongside WordPress' default database driver (wpdb), I see no real problems. It's only if you plan on fully integrating/overriding WP's driver that I see it being near-impossible; hard-coded SQL is prolific throughout core, and translating them to ActiveRecord method calls would defeat any ...



Only top voted, non community-wiki answers of a minimum length are eligible