Generating Output
To start, you will simply generate the output by running the program
through the debugger without setting any breakpoints.
- Specify datafile directory Ensure that the directory
specified on line 19 of the program exists as a root directory on the drive where
guestbook.php is stored.
- Configure debugging options From the menu, select Debug|Start
(or <F5>). In the Debugging
Options dialog box, configure the following options:
- General tab: Select the Simulate CGI Environment check box
- CGI Input tab:
- Set the Request Method option button to Post.
- From the Post Type drop-down list, Select URL encoded.
- From the Type drop-down list, select the variable type Post.
- Enter the following names in the Name text box, adding a meaningful
value for each in the Value text box. For example, the value for
"name" could be your own name. Click the Add button after each entry
to add it to the Browser Arguments.
- "name"
- "email"
- "company"
- "message"
- Run the debugger Click OK to run the debugger with the selected options.
- View the Output tab Notice the messages in the bottom left corner of the Komodo screen;
these inform you of the status of the debugger.
- View the rendered HTML Click on the "Toggle HTML Preview" button to the right of the Output Pane.
The HTML is displayed in the Output Pane; previous guestbook entries are displayed at the top of the
output, and the HTML form is displayed at the bottom. Click "Toggle HTML Preview" again to return to the HTML code.
- Create New File To create a new HTML file that contains the HTML code in the Output
Pane, select File|New|New File. In the New File dialog box, select the "Web" Category, and the HTML (4.01) Template.
Click OK.
- Save the Output Delete the contents of the new HTML file tab in the Editor Pane, then select the
contents of the Output Pane (Ctrl+A). Copy the contents to the new HTML file tab in the Editor Pane (Ctrl+C, Ctrl+V).
Select File|Save As to save the file with a unique name.
|