Well I would add another parameter to the change()
function like id.
I am a little bit confused that your PHP code is wrapped in JavaScript Tags 😀
In PHP i would do it like that:
function change($id) {
$sql="UPDATE wp_applications SET status="1" WHERE id = '$id'";
...
In the form i assume the id is stored in id column:
<input type="submit" name="activate" id="activate" value="Activate" onclick="change($client->id)" />
Related Posts:
- How to debug a plugin with Xdebug?
- Admin config screen without menu
- Is there widely accepted phpDoc syntax for documenting which hook calls a function?
- Make Categories and Tags required in admin
- Getting wrong relationship value in $args in wp_Query?
- wp_schedule_event in a class
- How to extend LINK TO functionality in ATTACHMENT DISPLAY SETTINGS
- How do I Make a Theme “plugin-ready”?
- How to iterate through custom posts and add the title to an array
- How to Structure a New Role/Capability Scheme?
- How to create Image gallery Metabox in wordpress [closed]
- Is it possible to create an action hook using do_action() within add_action()?
- Custom user profile, registration, login page with theme
- Plugin Sidebar is not Saving Meta Attribute to Post/Page after “Update”
- Why does preg_replace_callback never fire in this function?
- WordPress 2.8 Widget API is suitable for Worpress 3.1.4 plugins development?
- Need specific kind of “Poll Voting” for WordPress [closed]
- Install widget on plugin activation
- Call to undefined function get_blog_option()
- Unable to get content from $post on first publish
- Plugin admin page meta_box toggle and order state not saving
- Best Practices for Creating and Handling Forms with Plugins?
- Is there a better way to implement responsive images than what WordPress uses by default?
- Prevent Javascript Facebook SDK Conflicts in plugin
- Integrating Stripe PHP library into a custom WordPress Plugin
- How to change the URL pattern for single post view
- What for the tables ending with the meta used in database of wordpress?
- Use WP_Theme::scandir function to scan a plugin directory. Is there a way?
- Plugin options not being saved or created
- Customizer: widget-synced triggers twice
- Loading scripts with wp_register_script and wp_enqueue_script
- Plugin Repo: Why do some plugins get version charts while others don’t?
- maintaing consistent layout wordpress dashboard
- Change the ‘published on’ text?
- WordPress is automatically linking plain text email addresses
- .mo translation strings not loading in PHP scripts that handle AJAX calls
- How to get boolean value from register_meta properly?
- Plugin development – How to use a specific wp_options into the real rendered code in the front end?
- Gravity Forms Perks – Nested Forms
- Remove custom post type slug from URL and add taxonomy Slug
- How do I get the sub categories of the parent when in a sub category?
- custom permalink’s rewrite rule for page id
- how to get context information inside my funcion
- Is disabling test_form in wp_handle_upload a security concern?
- How can I identify it as admin page or not?
- AJAX form post returns 0
- Adding admin menus to wordpress
- Update custom plugin with WP-CLI
- Delete data from database using row action
- Autogenerate a Table of Contents
- Fatal error: Cannot redeclare admin_notice() [closed]
- Update wordpress Core Remotely
- Proper way to use useSelect
- How to create templates for a custom module to show on the front end within my theme?
- Access to apache logs from plugin
- Two different wordpress sites – same server and IP address. Gaining Access to database 1 of 2
- Translating plugin settings page – dropdown list
- Using function from enqueued .js file in theme in plugin?
- how to save wp_editor html content in options table
- Hide one specific woocoomerce product
- settings api – add_settings_section not working
- How to overwrite iris color pallates from theme to plugin
- Is there any way to hide page from dashboard (all pages list) OR navbar from plugin function?
- WordPress database error: [Query was empty] – using $wpdb->prepare()
- Is it possible to have instead mypage.com/?page_id=81 to have mypage.com/cool/?
- wp.media Uncaught TypeError: Cannot read properties of undefined (reading ‘state’)
- Pass custom props to
- Translations only load from `wp-content/languages/plugins` but not from the plugin’s languages folder
- GET request return value as error instead of success
- How to update global variables in plugin activation callback?
- Make visible page only in the trash
- Reading plugin settings in esnext wordpress block
- Plugin frontend page design irrespective of the theme used
- How to include a page template and template part into my plugin
- WP_Fatal_Error_Handler OR WP_Error OR try/catch
- Why does do_action pass a blank string as the first parameter if no $arg is set?
- Multiple instances of $opt_name in redux framework
- The Events Calendar featured image as body background?
- Pass javascript result to shortcode executer function
- How to store in the database directly the translation?
- How to affect front page by plugin
- Is there a an option to modify the post content directly on the browser instead of having it reflected on browser by modifying in the database?
- Plugins and how to assign urls to content
- Custom theme and plugin updating
- What method should I use to store my plugin data (multi level menus with options on each item)
- problem with blank page
- Error on using __FILE__ for add_menu_page() Function
- Getting error of unexpected output during activation
- Use custom clean URLs for a plug in
- Cannot echo a JS variable to a jQuery plugin coming from wp_localize_script
- Projectmanager Internal Link Code Location
- Select options not reloading after form submit
- first_name property missing inside register_user action hook
- Plugin SVN folder structure
- How do I use (or mimic) document.getElementById() on a page loaded from WordPress database?
- how many rupee or dollar charge to client to make theme [closed]
- What’s wrong in the WordPress Meta Box Generator code?
- add category id to option name when adding an option on edit_category
- esc_url, esc_url_raw or sanitize_url?
- React Plugin Settings Page Localization