Building a Forum with Dreamweaver – Part 4: Creating the Link to the Reply Form
Creating the Link to the Reply Form
The page used for replying to messages is called reply_message.php. Users can access it from the view_message.php page by clicking a Reply To Message link. To create this link, follow these steps:
- Open the view_message.php page in Dreamweaver.
-
Look for the text “Reply to this message” and select it.
The link will be displayed after each message. It must point to the reply_message.php page. The link must also pass the following parameters:
- Topic ID:
id_top
- Message ID:
id_msg
- Initial message ID:
idinit_msg
-
Select the reply_message.php page and then click the Parameters button to define the URL parameters mentioned above:
- Click the Plus (+) button to add a new parameter.
- Enter id_top for the name of the first parameter.
-
To specify a value, click the lightning bolt icon and then select the
idtop_msg
field of the rsMessages recordset (see Figure 1). - Click OK to close the user interface and add the URL parameter value.
-
Repeat the steps above to add the other two parameters. They must be configured as follows:
- For the message ID, enter id_msg for the parameter name and select the
id_msg
field as its value. - For the initial message ID, enter id_init_msg for the parameter name and select the
id_init_msg
field for its value. - Click OK twice to close the dialog boxes and create the link.
- Select the link and apply a Show If User Is Logged In server behavior by selecting the Server Behaviors tab > Plus (+) > MX Kollection > Conditional Regions. Configure it to restrict the display based on user name and password only, as you did previously in Part 3 for the Post Message link.
- Save the view_message.php page and close it.
To create the link, right-click the selected text and choose Make Link from the menu.
The Parameters dialog box should be configured as shown in Figure 2.
Next you will build the reply form.
Comments