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
- What is & used for
- Get checkbox value in jQuery
- How to create a HTML Cancel button that redirects to a URL
- Input Type URL – Says “Please enter a URL” if HTTP is not included
- FormData append not working
- Form inside a table
- Redirecting to a page after submitting form in HTML
- POST an array from an HTML form without javascript
- add_action reference a class
- Remove parent theme action in child
- How to do_action and get a return value?
- Remove an action from an external Class
- Does the event ‘wp_version_check’ even exist? What is it doing?
- Unable to prevent function using save_post firing twice
- Difference between do_action(‘admin_enqueue_scripts’, $hook_suffix) and do_action(“admin_print_styles-$hook_suffix”) syntax
- add_filter the_content str_replace after shortcode
- Why, Where, and When to use reference pointers in filters/hooks?
- Add a Custom Field in Comment Box AFTER text area BUT BEFORE Send button
- Using wp_insert_post and post_update_meta but need to fire save_post afterward
- enqueuing React script and hooking its target div fails to load script
- WP Login forms action URLs displayed as pretty URLs in browser (ex with Restore Password)
- 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
- 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
- wp_get_attachment_metadata returns false with add_action() ‘add_attachment’ hook
- 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
- Which action fire in front-end single post only
- Unable to show error message using wp_login action
- where is the documentation for add_action() parameters?
- Call add_action() in function wordpress
- How to remove function?
- Upload Image in a WordPress page using PHP
- What is the callback sent to add_submenu_page() invoked by WordPress?
- WordPress custom form action url
- How can I trigger actions manually?
- Add meta field after post has been published
- add_action() in switch statement
- Problem with get_the_excerpt when using an add_action(‘the_content’) containing script tags
- How to modify the action attribute of the wp-login.php?action=register form?
- Using Nested add_action()
- Are the hooks in the dashboard such as “load-$page_slug$” and “admin-head-$page_slug$” reliable and consistent throughout installs?
- Is there way to run a code every time when any cron is run?
- Why Won’t My Inputs in a form with a Get method work together?
- How to get the value of input hidden html from text editor to custom page template?
- How to insert HTML/JavaScript form into WordPress page? [closed]
- Building a request processor for multi-page forms, etc using $_GET requests
- Submit custom form from post content and execute in plugin
- add_action and do_action
- Add “add to cart” button in WooCommerce [closed]
- Gravity Forms parameters return 1
- Submit Form data to another page via Ajax (WordPress Way)
- Generate payment URL in custom email [closed]
- Why is my css and js not enqueued until footer?
- W3TC manual cache flush does not work
- Run a function on all posts
- Remove an action added within a class in a WordPress plugin
- HTML Form Submit to table in same page
- How to add post meta in while loop?
- add_action.. will work if function is empty?
- Trying to write a function in an external php file to manage admin menu visibility
- remove_action: Initial attempt failed while a later attempt worked
- Action inside another action not working
- Programming WordPress to send a custom-built form to specified email address
- How to use add_action inside files included by theme’s functions.php
- Custom forms with HTML
- WordPress sent multiple requests on update
- do_action in API call
- Add Tag to post after publishing
- Can’t Listen to KeyDown in TInyMCE Iframe (jQuery) and Pass it to Parent HTML FORM
- How do I dequeue js/css at the last possible moment?
- Why is my form going to frontend on html form submission present on the php files inside my custom plugin?
- wpdb->insert creates duplicate rows
- Remove action from plugin
- Custom HTML form using PHP – help with ajax/username validation
- Need data from two different actions
- Understanding and using did_action() in a conditional statement
- Why doesn’t a form need an ‘action’ with a plugin that uses the post data?
- Adding a conditional to work on certain pages/page templates to an add_action()
- Why is this require statement not working?
- Adapting functions from Genesis theme
- Cannot Schedule Sending An Email
- Invoke a function before the action hook
- using media_handle_sideload() to add mp4 files to Media Library
- OOP – add_action
- Passing arguments in add_action inside search template
- remove an action hook function on a plugin from a theme
- GET form action. Redirect to self
- wordpress not saving form code in code editor
- Submit button returns to index page instead of sending data