• 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

Get Header Authorization value of a login api (sent with username and password in json body) using php curl

What is the function of the (new Date()).getTime() in PHP?

Pass an image through AJAX [duplicate]

Add New Parameter to Existing URL using htaccess

Correct way to use LIKE '%{$var}%' with prepared statements?

How to display MySQL table using php and edit it in a web browser

Fatal error: [] operator not supported for strings

Magento Installation SQLSTATE[HY000] [2002] No such file or directory error

Error loading MySQLdb Module 'Did you install mysqlclient or MySQL-python?'

Split comma separated value from table column into rows using mysql?

google content api for shopping

What will the best solution for this multiple optional filter?

Why getting "Build step 'Execute shell' marked build as failure" error while creating a backup tar for files

Chunk and transpose a flat array into rows with a specific number of columns

Symfony run hint kernel.secret parameter not found

About Contact Privacy policy Terms and conditions