• Categories
    • PHP
    • phpMyAdmin
    • PHPMailer
    • FFMpeg
    • PHPEXcel
    • PHPDoc
    • PHPUnit
    • CakePHP
    • CakePHP 2.0
    • Cake PHP 2.1
    • CakePHP Model
    • Facebook PHP SDK
    • composer-php
    • PHP 7
    • PHP GD
    All Categories
  • About

Refresh specific HTML content that retrieves data from MySQL

javascriptphphtmlmysql


PHP Snippet 1:

    $(document).ready(function(){
        $('#btn_submit').click(function(){
            var get_data = $('#new_base').val();
            
            if($.trim(get_data) != '')
                {
                    $.ajax({
                        url:"db2.php",
                        method:"POST",
                        data:{new_base:get_data},
                        dataType:"text",
                        success:function(data)
                        {
                            $('#new_base').val("");
                        }   
                    });     
                }   
        });         
        setInterval(function(){
            $('#load_data').load("fetch.php").fadeIn("slow")
        }, 1000);
    }); 

Related Snippets

Laravel phpunit test failing authorization

How to solve Duplicate entry '0' for key 'PRIMARY' in Wordpress?

Display Link Title Instead of URL in XSL

Laravel 5.1 xmlHttpRequest AJAX POST TokenMismatchException

phpseclib 2.0 can not use Composer to create autoload

Twig - How to check if variable is a number / integer

Can't remotely connect to MySQL error (13) with PHP script, connecting through CLI works

Set quantity minimum, maximum and step at product level in Woocommerce

Add Class in html Dynamically in PHP

Laravel Carbon throws error The format separator does not match

display WooCommerce “Add to cart” button with short-code [add_to_cart ] dynamically

protect my blog content

Edit XML in HTML form and submit to self

Distribute array row data to make multiple new rows

How to trim a video by 4 fragments to 4 seconds using the PHP-FFMpeg?

About Contact Privacy policy Terms and conditions