villavulavala on "UPDATE using $wpdb in"

ساخت وبلاگ

I don't really understand what you're trying to do. What does the form's action attribute have to do with SQL UPDATE?

Let's start with some basic information, maybe that'll be enough to set you on the right path. There are not very many options for where to send form submits in WP. You could use AJAX to send the data, in which case the form's action is "#" because the data is actually sent via javascript, not with the form's normal action. AJAX requests always go through /wp-admin/admin-ajax.php.

You can submit forms to /wp-admin/admin-post.php. The form needs a field named "action" where the field's value is used to construct a WP action hook tag. The callback added to that action hook is what handles the form submit and presumably updates the DB in some manner.

The only other option is to create a custom page template to handle the form submit. Add a page based on this template, then have your form submit to that page's permalink.

Which method you select depends in part on what the user experience should be after the form is submitted.

WordPress ...
ما را در سایت WordPress دنبال می کنید

برچسب : نویسنده : استخدام کار wpss بازدید : 41 تاريخ : شنبه 4 ارديبهشت 1395 ساعت: 14:48