PHP is a simple example of JSON data transfer based on jquery Ajax technology, jqueryjson_php tutorial

Source: Internet
Author: User
Tags php server php database live chat

PHP delivers a simple example of JSON data based on jquery's Ajax technology, Jqueryjson


In this paper, a simple implementation method of PHP-based AJAX technology is presented. Share to everyone for your reference, as follows:

HTML page:

 
  A look at the show results submitted

PHP Page:

<?phpheader ("Content-type:text/html;charset=utf-8");    $username = $_post[' username ');    $age = $_post[' age '];    $job = $_post[' job '];    $json _arr = Array ("username" + $username, "age" = $age, "job" = $job);    $json _obj = Json_encode ($json _arr);    echo $json _obj;? >

Using the Post method

Read more about PHP related content readers can view the topic: "Php+ajax Tips and Applications Summary", "PHP operation and operator Usage Summary", "PHP Network Programming Skills Summary", "PHP Basic Grammar Primer Tutorial", "PHP operation Office Document Tips Summary ( including word,excel,access,ppt), PHP date and Time usage summary, PHP Primer for object-oriented programming, PHP string usage Summary, PHP+MYSQL database Operations Starter Tutorial, and A summary of common PHP database operation techniques

I hope this article is helpful to you in PHP programming.

Articles you may be interested in:

    • jquery sends requests to the PHP server via AJAX and returns JSON data
    • PHP combines jquery and Ajax for waterfall streaming effects
    • Php+jquery+ajax How to achieve the effect of praise (with source download)
    • jquery+ajax+php implementation of "like" rating feature attached source download
    • jquery and PHP combine to implement Ajax long polling (Longpoll)
    • jquery+ajax+php "like" rating feature implementation code
    • Jquery+ajax+php+mysql realization of pagination display data example explanation
    • Php+jquery+ajax+mysql How to realize the function of expressing mood
    • Php+jquery+ajax Implement user Login and exit
    • Php+jquery+ajax achieve multi-image upload effect
    • Php+jquery+ajax Implementing Live Chat instances
    • Jquery+php+ajax display upload progress and generate thumbnail code for multiple images
    • Jquery+php+ajax implementation of micro-Boga load more content list function

http://www.bkjia.com/PHPjc/1121286.html www.bkjia.com true http://www.bkjia.com/PHPjc/1121286.html techarticle PHP is a simple example of JSON data transfer based on jquery Ajax, Jqueryjson the simple implementation method of PHP-based AJAX technology to transmit JSON data. Share for everyone to join us ...

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.