PHP Select time does not jump refresh data
Dear God, I have a brief description of my problem.
I want to do two date selectors on the current page. Then, when the date is selected, the page does not jump to refresh the data in the table.
I know I can do it with Ajax. But my first contact with the PHP Web is not very clear, so you should try to be more detailed in the answer.
I'll go to my page first.
This is a date selector that has not been added.
That's what I wrote in my Code. (Because the time in my code is now written dead.) So make sure you don't know what to do by choosing a good date, passing a value into my SQL statement.
$top $end is the time selected by the selector. $data is my watch.
$DJVHJ =mysql_query ("Select SUM (single-machine rate) from $data where date between ' $top ' and ' $end '", $connone);
Ask the great God to teach you!
Share to:
------Solution--------------------
Did you make the date selector, not necessarily Ajax, to form the submission can also.
------Solution--------------------
1. Date selection, you can Baidu search, plugins a lot.
2.ajax implementation, let's think about it, add an ID to the search button, and then add a click event to the ID, and when the event triggers, it sends an AJAX request. The returned data you can choose to directly echo through the connection of your Ajax request, or on another page, and then load it back.