PHP AJAX receives database information

Updated on technology 2024-02-09
20 answers
  1. Anonymous users2024-02-05

    function updatepage(targetobject){if( == 4){

    var response = ;Assign the value returned by ajax to the responseIf you want to use this variable, you can call it directly, or you can return it outside of the function.

    response;Insert the value of the response into the HTML div, which is a simple function to get the PHP file after processing, please see the response, in fact, it is the effect you need.

  2. Anonymous users2024-02-04

    The following is a pseudo**.

    ajaxcall is your ajax function call, function(xhr) is the ** function when the ajax request is completed xhr is xmlhttprequest object.

    Assign the string of the response to the ajaxval variable.

    var ajaxval = ;

  3. Anonymous users2024-02-03

    $get, $post to get the arguments.

    Then just put it into the database.

  4. Anonymous users2024-02-02

    You should print the passed parameters first, right?

    print_r($_post);

  5. Anonymous users2024-02-01

    How big a person's heart is, how big the stage is.

  6. Anonymous users2024-01-31

    After the request is successful, empty the tbody (or define an id for the tbody and then manipulate the id) before putting the data.

    In fact, what you write is too troublesome, you directly post request your return json data. In the js for loop tr tag, put the json data into td, and that's OK

  7. Anonymous users2024-01-30

    Backstage**:

    include("");Connect to the database.

    print_r($_post);

    echo '

    echo 'post:' .$post["name"].'

    echo 'txt:' .$post["txt"].'

    mysql_query("insert into biao(name,txt) values ('','');

    That's it, you can use double quotes to introduce variables, and when you introduce an array, you need to use the variable space or remove the double quotes in the array [if it's a single quote].

  8. Anonymous users2024-01-29

    PHP can be used to make use of the predefined $post variable that can be used to get the data from method="post"or value from an ajax post request; For example, in the following example:

    Commit with ajax: $post(url,,callback);

    Then, in the php ** in the background of the server, you can use $post to get the value passed by ajax;

    name = $_post['name'];

    It is also possible to use the predefined $get and $request variables to receive the passed values; where $get is used to accept the pass value of the get request; $request is used to receive all the passed values including post and get.

    Note that the passed values need to be filtered to ensure that the passed values do not cause SQL injection or XSS attacks.

  9. Anonymous users2024-01-28

    It can be received with $post, and it can also be fetched with i in the tp framework. The values sent by ajax are passed in the form of arrays, so the server also receives them in the form of arrays.

  10. Anonymous users2024-01-27

    Received as a form submission, $geg $ post $ request, can be received without the ** function.

  11. Anonymous users2024-01-26

    can give you an example.

  12. Anonymous users2024-01-25

    The private message link address is sent to you.

    ABC data.

    ajax_echo '"'.$_post['data'].'"Caught it. ';

  13. Anonymous users2024-01-24

    if ($request['act'] == 'c**ignee_list')

    * Check if the user is logged in.

    If the user is already logged in, check if there is a default shipping address.

    If you are not logged in, you will be redirected to the login and registration page.

    if (empty($_session['direct_shopping']) session['user_id'] == 0)

    echo $json->encode($result);

    #addr_modify').click(function(),success:function(data)

    else if( == 2)

    #addr_modify').hide();

    #addr_okbox').hide();

    #addr_editbox').show();

    ;flow_

    define('in_ecs', true);

    if (!isset($_request['act']))

    json = new json;

    result = array('error' => 0, 'message' => '', 'content' => '');

    result['message'] = 'Accepted, please continue';

    echo $json->encode($result);

  14. Anonymous users2024-01-23

    4 ways jQuery writes ajax. ,data,callback,type)

    3、,data,callback,type)

    4、jquery (selector).load(url,data,callback)

    The first type is $ajax(, the data passed e.g. php is the argument, 100 is the value, with a colon in between, and the two arguments are separated by a comma.

    Equivalent to innerhtml

    ;php page.

    echo "php:".$_get['php'];The output value is a data value.

    Type 4 $(document)ready(function(),function(){

    For details, please refer to php100 109.

  15. Anonymous users2024-01-22

    ajax pass the parameters over.,You can get it.。。

  16. Anonymous users2024-01-21

    It's the same as a normal request.,w3cshool take a look.。

  17. Anonymous users2024-01-20

    The frontend HTML is to use AJAX to send requests, generally send and receive data in JSON format, and then set setinterval to send a request every 1 second cycle, and the background is also very simple:

    Just take the data sent back json encode() and echo json encode(array('time'=>time())

  18. Anonymous users2024-01-19

    It doesn't have to be ajax, you can use timed tasks.

  19. Anonymous users2024-01-18

    If you want to retrieve the database information like AJAX, then you need to read the database in PHP and let AJAX access it, you have PHP and get your data.

  20. Anonymous users2024-01-17

    AJAX is called in JS and has nothing to do with PHP.

Related questions
9 answers2024-02-09

You can make an information query system, if you haven't done it before, it is recommended to use ASP to write it first, this is relatively simple, even people who do not have a basic knowledge of network programming can get started in a short period of time. The written web program can be called on the network, and different permissions can be set for different users. In this way, you can achieve the function you want, but this is only the basic, and you should learn more deeply to achieve more complete functions. >>>More

10 answers2024-02-09

The database is generally composed of many tables, for example, the school builds a database, which can build a student table (including the student's name, age, student number, class, date of birth), a teacher table (including the teacher's name, age, teaching class, teaching category), a report sheet (including the student's student number, and the grades of each subject), etc. These are the ways in which the files are stored in the database, and try to make sure that the items in a table are closely related and have the same attributes, if this condition cannot be met, a table must be built (the redundancy of the built table has 4 levels). In order to meet the user's query needs, we also need to make a number of views, for example, you can make a view of his items have the name of the student, age, grades of each subject, and the teacher of each subject, etc., we can also export new items according to the existing items, for the purpose of simplicity, for example, the view can add an average grade, we add different permissions and roles to each view, and provide it to different people to query to protect the security of the database. >>>More

7 answers2024-02-09

First: you are lazy and push everything to someone else.

Second: There are no bonus points for your question. >>>More

11 answers2024-02-09

select ,from emp e left jion dept don ;

Left Company. The left link is, the left side prevails, and the right side is useless to make up for it. >>>More

13 answers2024-02-09

Let's say the textbox is named textbox and the string of numbers to be displayed is strfloat: >>>More