Use the following code:
<form action="action_page.php" method="post">
First name:<br>
<input type="text" name="firstname" value="">
<br>
Last name:<br>
<input type="text" name="lastname" value="">
<br>
<input type="submit" value="Submit">
</form>
and in file “action_page.php” Use the following code:
$firstname = $_POST["firstname"];
$lastname = $_POST["lastname"];
You can read the information with the following code:
<pre>
<?php
print_r($_POST);
؟>
</pre>
or
var_dump($_POST);
Related Posts:
- Validate form in functions.php, send errors back to template
- WordPress action admin_post for non-admin authenticated users – Form submission
- Instantiating classes through add_action and saving them to user_meta data [closed]
- Adding php to form action breaks code [closed]
- What do I put in the form action attr on top of form wordpress
- wordpress form action page not found
- navigate back with PHP form submission
- What is & used for
- Angular: mat-form-field must contain a MatFormFieldControl
- Multiple radio button groups in one form
- Why php tag is not working in html file?
- Get checkbox value in jQuery
- How to read if a checkbox is checked in PHP?
- Function not defined javascript
- How to submit a form with JavaScript by clicking a link?
- Multiple Forms or Multiple Submits in a Page?
- “AutoComplete=Off” not working on Google Chrome Browser
- How to create a HTML Cancel button that redirects to a URL
- How to get rid of blue outer border when clicking on a form input field?
- What does ngf-select do and why is it needed for form validation?
- Square brackets in CSS
- Input Type URL – Says “Please enter a URL” if HTTP is not included
- PHP $_POST not working?
- Clear form fields with jQuery
- FormData append not working
- Form inside a table
- JavaScript code to stop form submission
- Redirecting to a page after submitting form in HTML
- POST an array from an HTML form without javascript
- remove_action or remove_filter with external classes?
- add_action reference a class
- Why does save_post action fire when creating a new post?
- Remove parent theme action in child
- How to know what priority to use with add_action()?
- How to do_action and get a return value?
- Remove an action from an external Class
- Difference between do_action_ref_array() and do_action()
- Can my “add_action” function know the name of the hook calling it?
- Why is there both a save_post and wp_insert_post action?
- Does the event ‘wp_version_check’ even exist? What is it doing?
- When is admin_init Action ran?
- Can an action callback prevent the parent from continuing execution?
- remove_action in a theme
- add_action ‘manage_posts_custom_column’ in a class [closed]
- Style reply form different than comment form
- How do I enqueue a script to run inside the Gutenberg editor?
- How can I find out what functions are assigned to actions?
- Unable to prevent function using save_post firing twice
- How do we remove the H3 tag for the reply-title I.D
- Difference between do_action(‘admin_enqueue_scripts’, $hook_suffix) and do_action(“admin_print_styles-$hook_suffix”) syntax
- Cron jobs in a class
- Add something to beginning of the content
- Disable WooCommerce action
- add_filter the_content str_replace after shortcode
- How can I remove the WP menu from the admin bar?
- Refresh page after form action
- When and Where to use wp_insert_post()
- Why, Where, and When to use reference pointers in filters/hooks?
- inside a metabox
- add_action customize_register not working
- Passing arguments into ‘init’ function
- Add a Custom Field in Comment Box AFTER text area BUT BEFORE Send button
- How to use conditional add_action for WordPress
- Using wp_insert_post and post_update_meta but need to fire save_post afterward
- WP Schedule Event – Every Day When First Visitor Comes
- enqueuing React script and hooking its target div fails to load script
- wp_logout action not working
- WP Login forms action URLs displayed as pretty URLs in browser (ex with Restore Password)
- How to remove an action that is added inside a class
- Sending form data via PHPMailer – How to action PHP script from a form
- Having an add_action( ‘user_new_form’,) [closed]
- Using auth_redirect returns cannot modify header information
- add action which returns modified value
- What would cause the ‘wp’ action to fire twice per page (but only once per post) in Firefox only?
- Problem:Save Several Duplicate posts in The Database and then Error nesting level of ‘100’ reached
- How to remove an action added by a child theme of Genesis
- I don’t understand why I need a lower priority to remove an action with a higher priority to make it work
- WordPress admin WP_table_list show incorrectly
- wp_get_attachment_metadata returns false with add_action() ‘add_attachment’ hook
- How to add a checkbox inside the “Publish post” widget?
- Manually add admin bar
- Is there a way to expose additional fields to the Bulk Action > Edit functionality?
- What’s the usage of action do_meta_boxes?
- How can I invoke an action after a CiviCRM triggering event?
- Custom bulk actions in WP 3.7.1
- Remove action from a plugin class
- do_action pass array argument as reference not copy [duplicate]
- how can I use add_action with external class which the function contain 2 argument?
- remove_action not working with procedural function
- Why Should We Use wp_clear_scheduled_hook and What it Does?
- Woocommerce Change placement with wrapper
- Modify query in pre_get_posts action is messing up my nav menu
- Exclude trash from save_post
- How to check if an action is already fired?
- add_action and wp_head not display content in head section
- Scheduled event won’t fire
- Which action fire in front-end single post only
- When should I call add_settings_section and add_settings_field?
- use add_action(‘wp_head’) in a widget
- Unable to show error message using wp_login action