Graphics Programs Reference
In-Depth Information
4. Add a radio group in the second row, name the radio group vote , replace “Radio”
with The Bucker in the fi rst row of both the Label and Value columns, replace
“Radio” with Grubpile in the second row of both the Label and Value columns, click
the Plus (+) button to add a new row, replace “Radio” with A Quiet Day in Utica in
the third row of both the Label and the Value columns, and then click the OK button.
5. Add a Submit button in the third row of the table, typing Submit as the button name
and the value, if necessary, and then save the page.
6. Connect to an existing database or create the database on your remote server using
the cowboy_db.sql fi le located in the Tutorial.09\Case2 folder included with your
Data Files. ( Hint : Obtain the information you need from your instructor or technical
support person.)
7. In the Server Behaviors panel, click the document type link in Step 2, click PHP in
the list, click the OK button, update the links, click the OK button to confi rm that the
index.php page could not be updated, save the index.php page, update the link for
the hotspot that covers the entire top banner of the page to the index.php page, and
then save the page again.
8. Click the testing server link in Step 3, check the Testing check box for the cowboy
Charlie web server, edit the Server profi le, if necessary, and adjust the Web URL
prefi x box, type the URL for your posted site, click the Save button, and then click
Save again.
9. In the Server Behaviors panel, add the Recordset behavior, name the recordset
charlie_record , click the Defi ne button, click the New button, type charlie_connect
as the connection name, type localhost or the database server URL in the MySQL
server box, type your username and password, click the Select button to display a
list of databases, select the cowboy_db database from the list, click the OK button
twice, click the Done button, click the Simple button, if necessary, and then click
charlie_connect in the Connection list.
10. Click the Advanced button, delete all the text in the SQL box, type the following
code exactly as it appears, click the Test button, close the test dialog box, and then
click the OK button to enter a query that enables the vote tally to be displayed in a
dynamic table.
SELECT vote AS Painting, count(vote) AS Votes
FROM vote
GROUP BY vote
ORDER BY vote
11. In the Server Behaviors panel, add the Insert Record behavior, click voteform in the
Submit values from list, if necessary, click charlie_connect in the Connection list,
click vote in the Insert Table list, click 'vote' Gets Value From 'FORM.vote' as 'Text'
in the Columns list, click FORM.vote in the Value list, click Text in the Submit as
list if necessary, click the Browse button, click the index.php page in the local root
folder (because the totals will be displayed in this page), and click the OK button in
each dialog box that appears. 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),
preview the page in a browser (update the page and dependent fi les on the testing
server), and then close the browser.
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.php page, upload the page to your remote server (include dependent
fi les), preview the page in a browser (update the page and the dependent fi les on the
testing server, if necessary), click an option button in the form, and then submit the
Search WWH ::




Custom Search