Button clicks are client side whereas PHP is executed server side, but you can achieve this by using Ajax:
$('.button').click(function() { $.ajax({ type: "POST", url: "some.php", data: { name: "John" } }).done(function( msg ) { alert( "Data Saved: " + msg ); }); });
In your PHP file:
<?php function abc($name){ // Your code here } ?>
Related Posts:
- How to call a PHP function on the click of a button
- count(): Parameter must be an array or an object that implements Countable error in php
- count(): Parameter must be an array or an object that implements Countable error in php
- Parse error: Syntax error, unexpected end of file in my PHP code
- Parse error: Syntax error, unexpected end of file in my PHP code
- Parse error: Syntax error, unexpected end of file in my PHP code
- Double click and run the Php script on mac
- localhost/test.php returns nothing
- What are .tpl files? PHP, web design
- How to solve PHP error ‘Notice: Array to string conversion in…’
- How to read if a checkbox is checked in PHP?
- Document Root PHP
- How to use PHP inside css file
- PHP Include Nav-bar For Every Page Techniques?
- How to create a text box in PHP to output data
- HTML vs SHTML vs PHTML
- Center image using text-align center?
- CSS Background Opacity [duplicate]
- How to create an HTML button that acts like a link
- Remove CSS class from element with JavaScript (no jQuery) [duplicate]
- How to get a tab character?
- How to make JavaScript execute after page load?
- Is there an upside down caret character?
- Prevent line-break of span element
- How can I get the values of data attributes in JavaScript code?
- Disable Scrolling on Body
- Darken CSS background image?
- Alternative to iFrames with HTML5
- Responsive image map
- How to darken a CSS background image?
- How can I create a marquee effect?
- What is “X-Content-Type-Options=nosniff”?
- How to make an input type=button act like a hyperlink and redirect using a get request?
- How do you give iframe 100% height
- HTML Display Current date
- Error: The requested URL “[no URL]”, is invalid
- How to get CSS to select ID that begins with a string (not in Javascript)?
- Hidden property of a button in HTML
- How to display a gif fullscreen for a webpage background?
- Padding a table row
- How to align 3 divs (left/center/right) inside another div?
- The character encoding of the HTML document was not declared
- How to create spoiler text?
- How do I horizontally center a table in Bootstrap
- How do I center text in a span?
- text-align justify not working
- Best way to center a on a page vertically and horizontally?
- Find out whether radio button is checked with JQuery?
- Display text on MouseOver for image in html
- Pure HTML Back Button
- How to access and download a file from a server using HTML 5
- Display text on MouseOver for image in html
- Layout a flex box similar to a table?
- html : iframe not showing content in html
- How can I capture the right-click event in JavaScript?
- POST an array from an HTML form without javascript
- add_filter the_content str_replace after shortcode
- How can I publish Word files to a WordPress blog without losing the footnotes?
- How do I make wordpress comment fields required?
- Javascript code inside “” in core WordPress files .php
- Remove html markup by wordpress
- Multiple options not staying selected after saving
- How can I set different html lang attribute for different countries?
- How to remove ?wp-mce-4103-20162941
- parts of url disappear when using # inside href=”” [closed]
- Add Attribute to p Tag of Post Content
- How to insert HTML/JavaScript form into WordPress page? [closed]
- custom html in page change in browser
- Add .htm extention to a custom taxonomy
- Can’t save any WordPress post with the html tag in it
- How do I add a custom css to all posts without affecting homepage css? [closed]
- Noscript not working as it should in wordpress site
- Wrapping a Sidebar within
- How to edit HTML of my website on WordPress? [closed]
- remove string: ‘custom content…’ from every page
- Whitespace Before Doctype
- How to add post meta in while loop?
- Adding function to child theme’s function.php
- Link to page with posts of specific type
- html entities occur in the_excerpt used as meta description
- Allow Access To Subfolder Of HTML For Logged In Visitors
- Removing Line Break Tags from a Page
- Displaying images outside the content
- Use Mail-Tag from Contac Form 7 in a script
- PHP function for horizontal Woocommerce thumbnails and badges
- Drop down question
- Unable to autoplay and loop a cinemagraph from Imgur
- How to override html codes in wordpress?
- standard callback function for wp_list_comments
- How to create a php page to collect information from a html page
- How to replace a specific html tag in bulk?
- Can’t make product images clickable
- I need help implement a Javascript code into the PHP file
- Category – “No content found”
- Inserting code into a page just shows raw HTML
- WordPress – Image href for home menu nav not working
- How to get all the terms of a post
- How can I insert a disclaimer in a WordPress site?
- Parse error: syntax error, unexpected ‘}’ in
- Moving from Microsoft Front Page 2003 to WordPress