Creating the Output
To start, we'll 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 on the drive where
guestbook.php is stored.
- Run the debugger Click on the "guestbook.php" tab
in the editor. From the menu, select Debug|Start (or <F5>).
- Configure debugging options In the
Debugging
Options dialog, configure the following options:
- General tab: click Simulate CGI Environment
- CGI Input tab:
- set the Request Method to Post
- set the Post Type to URL encoded
- add the following variables, with the Type of Post
and any Value
- name
- email
- company
- message
Click OK to continue.
- 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. When the program has finished, the message "Process terminated
with exit code 0" is displayed on the Output tab in the Output pane.
- View rendered HTML Click on the "Toggle HTML Preview" button to the right of the Output window.
The HTML code 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.
- Save the Output 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, select the HTML Category, and the HTML 4.01 Template.
Select all the text in the Output pane, then copy it to the new HTML file tab in the Editor pane. Select
File|Save As to save the file with a unique name.
|