Showcase and discover digital art at yex

Follow Design Stacks

Subscribe to our free newsletter to get all our latest tutorials and articles delivered directly to your inbox!

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:

  1. Open the view_message.php page in Dreamweaver.
  2. 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

    To create the link, right-click the selected text and choose Make Link from the menu.

  3. Select the reply_message.php page and then click the Parameters button to define the URL parameters mentioned above:

    1. Click the Plus (+) button to add a new parameter.
    2. Enter id_top for the name of the first parameter.
    3. To specify a value, click the lightning bolt icon and then select the idtop_msg field of the rsMessages recordset (see Figure 1).

      Selecting the dynamic value for the URL parameter

      Figure 1. Selecting the dynamic value for the URL parameter

  4. Click OK to close the user interface and add the URL parameter value.
  5. 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.

    The Parameters dialog box should be configured as shown in Figure 2.

    URL parameters

    Figure 2. URL parameters

  6. Click OK twice to close the dialog boxes and create the link.
  7. 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.
  8. Save the view_message.php page and close it.

Next you will build the reply form.