To accept how HTML forms, databases, Active Server Pages, and SQL fit together, let’s assay the archetypal archetype of a database-driven Web page: a Web armpit bedfellow book. You’ve apparently active a bedfellow book on a Web armpit at some point while Web surfing. The archetypal Web armpit bedfellow book usually asks for your name, email address, age, gender, and a animadversion (see Figure 1 for an example).
Figure 1 Sample HTML bedfellow book form.
When you ample out the anatomy and bang the abide onusually labeled SIGN MY GUEST BOOK or some equivalentyou’re about brought to a folio that acknowledgment you for bushing out the bedfellow book, or one that shows your bedfellow book access forth with those of all the added users who active the bedfellow book (see Figure 2).
Figure 2 Capacity of the bedfellow book, displayed afterwards beat the SIGN MY GUEST BOOK on.
The big catechism is what happens amid the time you bang the SIGN MY GUEST BOOK on and the time the bedfellow book’s agreeable is displayed on the screen. If you apperceive the acknowledgment to that question, you apperceive how databases and SQL interact with HTML forms and Active Server Pages. If you don’t apperceive the answer, amuse apprehend on.
When a user fills out a anatomy and clicks the abide on, the information that the user entered (for example, Barney Rubble, [email protected], 34, male, I Love Betty, and so on) is beatific to the Web server (such as http://www.ProfessorF.com) along with the name of an Active Server Pages book that the server should execute to action the user’s abstracts (for example, insert.asp). The actual name of the Active Server Pages book is hidden central the HTML source file for the bedfellow book. If your browser is Microsoft Explorer, you can find this name by activity to your browser’s Appearance card and selecting the Source menu item. A awning will again pop up. Scroll through this awning attractive for a <FORM> tag. One of the ambit for the <FORM> tag is labeled ACTION, and its amount is the name of the Active Server Pages book that the Web server should assassinate (in Listing 1, that’s insert.asp):
Back to our example. The Web server passes the user’s advice to the ASP calligraphy (insert.asp, additionally accepted as the admit script), which first opens a database (see Listing 2, footfall 1), and again places the user’s data into the database (step 2). To abode the user’s advice into the database, the ASP cipher charge acquaint with the database in a appropriate language known as Structured Query Accent (SQL), as apparent in the d text in footfall 2. Afterwards the ASP calligraphy inserts the user’s advice into the database, the final footfall (step 3) is to alarm a retrieve script, which displays the database information; in this example, that’s the guest book.
We mentioned that an ASP calligraphy could accommodate both VBScript and HTML code. Note, however, that the admit calligraphy in Listing 2 alone has VBScriptand it’s additionally accessible to accept an ASP book absolute just HTML.
The ASP retrieve script, retrieve.asp, combines VBScript and HTML. The calligraphy starts off by aperture the database (see Listing 3, footfall 1) and then sends an SQL command to retrieve the absolute capacity of the bedfellow book (step 2). The calligraphy again intersperses VBScript and HTML to architecture the capacity of the guest book. You can acquaint the aberration amid the HTML and VBScript because the VBScript is independent aural <% and %> syms.
In our example, afterwards the retrieve.asp calligraphy executes, the user sees the capacity of the bedfellow book (refer to Figure 2).
The diagram in Figure 3 summarizes the above-mentioned discussion. The HTML anatomy sends the user’s advice to an ASP admit script, which uses SQL to admit the advice into a database. An ASP retrieve calligraphy uses SQL to apprehend abstracts from the database, which it formats appliance HTML, and sends that HTML to the user’s browser. If you try to appearance the antecedent for this HTML, you won’t see any VBScript at all, back all cipher is accomplished on the Web server and the cipher alone sends HTML to the browser.
Figure 3 Graphical delineation of how the HTML form, ASP admit (store) script, database, and ASP retrieve calligraphy fit together.
To summarize, back you actualize a database-driven Web application, you always develop four pieces:
A anatomy in HTML to get advice from a user (such as guestbook.html)
An admit calligraphy in Active Server Pages to put the user’s information into the database (such as insert.asp)
A database to abundance the advice (such as visualtutorial.mdb)
A retrieve calligraphy in Active Server Pages to get advice out of the database and affectation it on the user’s browser (such as retrieve.asp)
You upload all these pieces to your Web server, aloof as you would your HTML files. Our archetype put these pieces in abstracted files, but it’s accepted to combine the pieces; for example, the HTML anatomy can be put in the aforementioned book as the admit script.
The Shocking Revelation Of Html Upload Form Example | Html Upload Form Example – html upload form example
| Allowed to be able to the blog, in this moment I’m going to provide you with with regards to html upload form example