Php selection time does not jump to refresh data-php Tutorial

Source: Internet
Author: User
Php selects time and does not jump to refresh data. I will briefly describe my problem

I want to create two date selectors on the current page. After the date is selected, the page will not jump to refresh the data in the table.

I know it can be done using ajax. However, I am not very clear about my first contact with php web, so please try your best to provide more details.

Let me first go to my page.



There is no date selector.

This is what I wrote in my code. (Because the time in my code is writing to death. So you must pass the value to my SQL statement by selecting a date.) you do not know how to do this.
$ Top $ end is the time selected by the selector. $ Data is my table

$ Djvhj = mysql_query ("select sum (standalone rate) FROM $ data where date between '$ top' and '$ end'", $ connone );


Please kindly advise!


Reply to discussion (solution)

Is your date selector ready? you don't have to use ajax. you can make it into a form for submission.

1. date selection, you can search Baidu, there are a lot of plug-ins.
2. ajax implementation. let's talk about the idea. add an id to the search button and a click event to the id. when this event is triggered, an ajax request is sent. You can directly echo the returned data in the connection of your ajax request, or process the data on another page and load the data back.

Is your date selector ready? you don't have to use ajax. you can make it into a form for submission.

No. You want a ready-made one. The question is, what is the form to be implemented? Can you give me some specific solutions?

Related Article

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.