Graphics Programs Reference
In-Depth Information
GROUP BY vote
ORDER BY vote
11. In the Server Behaviors panel, add the Insert Record behavior, click charlie_connect
in the Connection list, click vote in the Insert into table list, click the Browse button,
click the index.asp page in the local root folder (because the totals will be displayed
in this page), click the OK button, click voteform in the Get values from list if nec-
essary, click vote in the Column list, click vote inserts into column “vote” (Text) in
the Form elements list, and then click the OK button. The Insert Record behavior is
added to the page and appears in the Server Behaviors panel.
12. Save the page, upload the page to your remote server (include dependent fi les), pre-
view the page in a browser, and then close the browser.
If the page will not display, Dreamweaver has not added a piece of code that you
need to insert. Open the index.asp page in Code view, scroll to approximately
Line 109, and locate the following code:
<objectƒdata=”media/cr_art.swf”ƒtype=”application/x-shockwave-fl ash”
width=”400”ƒheight=”300”ƒalign=”top”>
After the opening bracket, type <%%> (before object) and then repeat Step 12.
13. Place the insertion point in a blank line below the form, click Dynamic Table in the
Dynamic Data list in the Data category of the Insert panel, click the All records but-
ton, set the border to 0, set the cell padding to 3, and then click the OK button.
14. Format the table heading text with the h2 tag.
15. Save the index.asp page, upload the page to your remote server (include dependent
fi les), preview the index.asp page in a browser, click an option button in the form,
and then submit the form. The new vote tally appears below the form in the page.
( Hint : If you are sharing a database with classmates, you might see additional entries
in the database.)
16. Submit the fi nished fi les to your instructor.
Case Problem 3
Display coaching
topics stored in
a database in the
home page of
a Web site for a
life coach.
Data File needed for this Case Problem: tess_db.sql or tess_db.mdb
Success With Tess Tess wants to add an online coaching section to the Success With
Tess site. In this section, she will provide general information on a wide range of hot
coaching topics. You will create a Topics Admin page, and then add a form in the page
that enables Tess to enter topic content. To ensure that she doesn't accidentally submit
forms with empty entries, you will use the Spry Validation Textarea, which allows forms
to be submitted only when the text area contains content. The form will be connected to
a database. Finally, you will add an online coaching section to the coaching.html page
and include code to display the content stored in the database.
If you are using MySQL and PHP on a Linux server, complete the following steps:
1. Open the Success With Tess site you modifi ed in Tutorial 8.
2. In the Files panel, duplicate the coaching.html page, rename the copied page as
topics.php , and then open the topics.php page in Design view.
3. Change the heading text to Topic Input , replace the word “Coaching” in the page
title with Topic Input , and then delete the content in the page.
4. Insert a form in the page, enter topicform as the form name, and then, in the form,
insert a table with 2 rows, 2 columns, 90 percent table width, 0 border thickness,
3 cell padding, 0 cell spacing, and no header cells.
5. Type input coaching topic in the upper-left cell, and then align the text to the Right
and Top.
Search WWH ::




Custom Search