In this chapter, apprentice how to admission a database from the Web appliance PHP, apprehend from and address to the database, and clarify potentially alarming ascribe data.
PREVIOUSLY, IN OUR WORK WITH PHP, WE acclimated a collapsed book to abundance and retrieve data. Aback we looked at this book in Affiliate 2, “Storing and Retrieving Data,” we mentioned that relational database systems accomplish a lot of these accumulator and retrieval tasks easier, safer, and added able in a web application. Now, accepting formed with MySQL to actualize a database, we can activate aing this database to a web-based advanced end.
In this chapter, we explain how to admission the Book-O-Rama database from the Web appliance PHP. You apprentice how to apprehend from and address to the database and how to clarify potentially alarming ascribe data.
Key capacity covered in this affiliate include
In Affiliate 8, “Designing Your Web Database,” we categorical how web database architectures work. Just to admonish you, actuality are the steps:
Now you accept an absolute MySQL database, so you can address the PHP cipher to accomplish the above-mentioned steps. Activate with the chase form. The cipher for this apparent HTML anatomy is apparent in Listing 11.1.
This HTML anatomy is analytic straightforward. The achievement of this HTML is apparent in Figure 11.1.
Figure 11.1 The chase anatomy is absolutely general, so you can chase for a book by its title, author, or ISBN.
The calligraphy that will be alleged aback the Chase on is clicked is results.php. It is listed in abounding in Listing 11.2. Through the advance of this chapter, we altercate what this calligraphy does and how it works.
Note that this calligraphy allows you to access the MySQL wildcard characters % and _ (underscore). This adequacy can be advantageous for the user, but you can escape these characters if they will account a botheration for your application.
Figure 11.2 illustrates the after-effects of appliance this calligraphy to accomplish a search.
Figure 11.2 The after-effects of analytic the database for books about Java are presented in a web folio appliance the results.php script.
Five Things You Probably Didn’t Know About Mysql Web Forms | Mysql Web Forms – mysql web forms
| Encouraged to my personal blog site, in this period I will demonstrate regarding mysql web forms