Php+mysql+ajax building a book Management system

Source: Internet
Author: User

After this development or have a very deep sentiment, although this is a very small back and forth of the joint project, but after all, it is their own hands will it "", or cherish it, but also really let me grow slightly.

Duration: Two weeks

Technology: MYSQL+PHP+AJAX+JQUERY+H5+CSS3

First of all, why do you do this, mainly because I feel that this thing has been a little contact before and can understand its principle, at least if the hand is still able to clear the idea, so he started to dry up.

1. First, the layout of the static page

My page layout is simple.

About the book show part, I have thought to embed a 3d Display Web page, the style looks cool, but the art is not fine, I found that can not get to the inside of the image ID, which is unable to manipulate the contents of the IFRAME, surfing the internet for a few days, or not under the hand to continue, had to give up this 3d show, Then I went online to find a good picture of the case, and then understand the jquery magnifier, it is a tag mosaic img,img binding hover event, a tag, the link is a large picture, the mouse over the IMG will be on the right of the picture to a small square size area display large map, Well, there is a problem, the bound event on the Ajax new image does not work, and later to understand, found that because the DOM update did not keep up, the cause of the asynchronous, there is a solution, but I have abandoned it, chose the simplest display, no Hover,click event. After the style is set, I'm going to start tossing the database, Index.js in the use of Ajax to obtain book data, geibook.php directly link to the database, followed by SQL statements, and then ench to Index.js success:function, and then the operation of the DOM to add data into the page. But also encountered a problem, a lot of book data, one-time all get, will page pull very long, user experience is bad, so I have to start Daoteng pagination

For paging, I paused the original project to create a new project, specifically to understand the paging principle (limit), spent a day, better understand the paging principle, back to their own projects, each page shows 20 data, made a page bar, here is a pit, Discover that clicking on the next page does not work. Always show page value undefined, later only to know is actually a very simple reason, my page value when the Click event occurs when the $ (this). Rel obtained, but because the height of the previous a label is not set, it covers the ' On the next page ' this a tag, so click In fact is clicked on a label, get the wrong, of course, adjusted a height of a can be normal switch page, the next is to improve the other functions, the page has a category of books, I have to achieve click on a category of books will only show the category of books, the category of books will also be paginated display , that is to the backstage to two parameters, a booktype, a page value, this is good to do, the idea of clearing the good.

Next is the search box, how to do the input of a book key words appear a series of books containing the key words, speaking of which I have to say, when encountering problems to solve to learn is the best way to learn, before that in order to learn is really not true. So I searched the data online, but also asked their teachers, just know like query, although in the format Daoteng a good, but finally realized the key word query this function.

That's about it. Oh, it's like that:

And then it's the admin page.

This page is the use of bootstrap rapid build up, mainly to the left to achieve increased book information Form form, the right of a saved book information display bar, because before has done too much page bar, so also in this did the page bar, there is to be modified and deleted, The principle is to get the ID by clicking on the event, and then Ajax passes the BookID to the appropriate PHP page, and the SQL statement in PHP is modified and deleted.

Attach the project file directory structure,

It seems like this, really nothing difficult, or self-apprenticeship < bay stretched out >

The road long its repair far XI, I will go up and down and quest.

Php+mysql+ajax building a book Management system

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.