You should post to the same URL and catch the submit ex:
function option_page_html(){
if (isset($_POST['plugin_action']) && $_POST['plugin_action'] == 'post_url'){
include_once(plugin_dir_path(__FILE__).'post-video.php');
}
?>
<div>
<form action="" method="post">
<p><h3>Paste video url</h3></p>
<input type="text" size="100" name="url" /><br/>
<input type="hidden" name="plugin_action" value="post_url">
<input type="submit" value="Post"/>
</form>
</div>
<?php
}
note : this is an example and you should make sure you sanitize and validate the value and probably use nonce
for better security
Related Posts:
- Customizing subject in comment notification e-mails
- How to Loop Plugin Option Field Set?
- Saving Plugin settings to the database
- HELP: Integrating WP with raw PHP code once published button is hit
- I would like to use create a function in my custom plugin to tell WP to use a different header
- Scope for PHP Variables Assigned in functions.php or a plugin
- WordPress Plugin Page is Loading in Admin Content Container Instead of Separate Page
- wordpress plugin is not activating from widget
- Edit Yoast SEO breadcrumbs output [closed]
- Conditional attributes and logic per product category
- WordPress get_avatar function not correct working
- Redirect to another page using contact form 7? [closed]
- Check if variable is set in filter
- execute function after one completed
- Plugin onclick button activate other plugin
- Different registration form for different roles
- More gentle way to hook WordPress custom url
- How to add custom function to pluggable.php
- Checkbox show / hide output result
- Allow a particular user to access a particular plugin?
- Cookie value changes back to previous value after changing
- Is there any way to sync Facebook Comments and with comments on WordPress website?
- Custom Plugin: How to Include Install Buttons of other 3rd Party Plugins?
- adding dynamic/multiple slug values in ‘option_none_value’
- working code, not working – Plugin Dev
- Is admin section completely customizable in terms of styling?
- register_activation_hook doesn’t fire at all
- My ajax request don´t work and return 0
- WordPress environment not loading properly
- Populate select option with JSON file
- Saving an array to get_options
- Saving plugin data returns “You do not have sufficient permissions to access this page.”
- How to add a handler for a button in plugin?
- Can anyone tell me why I can’t edit a plugin when it is installed without having to re-install?
- How use Dynamic hyperlink on each wordpress post?
- How can I save the selected page in the dropdown after anyone clicks on Save Changes?
- How can I save the selected page in the dropdown after anyone clicks on Save Changes?
- if plugin is active? check if plugin is enabled or not?
- Making plugin unique to not conflict with plugins with the same name
- How to find out if option exists but is empty?
- Errors while using ajax from external wordpress page
- shortcode doesn’t work
- Deleting images through upload folder, but not deleting from media library
- WordPress plugin installation
- Create or Update thousands of woocommerce products via PHP
- How to Replace Words with Hypertext Link But Ignore Previously Existed Links?
- send_headers don’t work on wordpress multisite
- Update Option Error: Notice: Undefined index
- plugin development: problem with functions
- Where should I save an API key of my user when installing my plugin?
- Custom form action to handle data inside a plugin
- Self deactivate plugins after an action occurs
- WP Post Template – Templates in own folder
- Override Plugin Script Fucnction in WordPress
- Image upload and download from front-end
- Replacing a plugin function with a custom renamed function doesn’t work
- How to output CMB2 select options from repeated groups select elements?
- How to call WordPress function other files
- Ajax call returning 0
- How to deal with WordPress and Pocket API to automate content curation on my hosted wordpress blog? [closed]
- WP All Import – Execute Imports
- What is @Action in WordPress?
- WordPress checkbox and Illegal string offset
- Include a php file from another plugin
- wp_enqueue_scripts
- How to create plugin/ page that reads from database
- How can I fetch data from another website to my wordpress website with mysql database
- Save user total active time after login in wordpress [closed]
- Switch from wp-cron to a server cron job
- Calling a save function from a “submit” button
- Wp Debug Enabled True Notices and Warning
- My widget won’t update its values when save is clicked
- Adding a Tag Parameter / Filter to My Shortcode
- i need to make custom cron_schedule with custom interval time as a parameter into a custom payment gateway plugin wordpress
- How to upload large media file in chunks, without any plugin?
- Unexpected add action function in WP plugin
- Prevent WordPress from sending set-cookie http header
- WP Function does not trigger on Webhook API Call
- WordPress rewrite rule depend on meta values not ids
- Easiest way to load/fire a handful of functions, IF checkbox is checked?
- Problem with wordpress has_action() function
- Offering a freemium plugin (a free version + paid version)
- post id or permalink auto-incrementing number and reset everyday
- Change pricing in Woocommerce based on Category and Product [closed]
- Update (a function) post’s featured image as soon as $image_url changes
- WordPress not displaying information on post sent from custom admin form
- How to replace native comment_count with Comments Evolved aggregate count
- Hook into install email
- Is there any wordpress function to update a random post every 10 minutes?
- Autoloading a PHP class – working outside, but not inside WordPress plugin
- Calling an custom field from theme option at the frontend
- Undefined variable _POST
- What can I do to customize a widget provided with this plugin? from where have I to start?
- WordPress: code structure
- PHP if url extension action=discussion condition use [closed]
- Function not being called on form submit, only blank admin-post.php page
- Gravity Forms and Gravity View Permissions
- WordPress Convert queries to slashes using function.php
- WordPress Throwing Deprecated Errors on its own Files
- plugin doesn’t retrieve data from database