• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Adding query string parameter to link

Community Expert ,
Jul 08, 2012 Jul 08, 2012

Copy link to clipboard

Copied

I'm reviewing this tutorial by David Powers and I'm using CS6. 

http://www.adobe.com/devnet/dreamweaver/articles/first_dynamic_site_pt2.html

Everything went well until I tried to add query string parameters to links (EDIT and DELETE) on the manage_posts.php  page.

"You add a query string to the end of a link through the Parameters dialog box, and bind the primary key from the recordset. Although it's a simple operation, many people tend to get it wrong, so follow the next steps carefully."

I did.  In fact I did it twice.  Both times DW inserted = sign in the wrong place.

DWCS6 code:

<td><a href="update_post.php?<?php echo $row_getPosts['post_id']; ?>=<?php echo $row_getPosts['post_id']; ?>">EDIT</a></td>    

Corrected Code:

<td><a href="update_post.php?post_id=<?php echo $row_getPosts['post_id']; ?>">EDIT</a></td>

Anyone else experiencing this?

Nancy O.

Nancy O'Shea— Product User, Community Expert & Moderator
TOPICS
Server side applications

Views

796

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 09, 2012 Jul 09, 2012

Copy link to clipboard

Copied

As the tutorial instructions say, "In the Parameters dialog box, type post_id in the Name field."

You type the Name value manually. Then you click the lightning bolt icon for the Value field to add the dynamic data. This is what the Parameters dialog box should look like when you have finished:

parameters_post_id.jpg

Looking at the code that has been generated by Dreamweaver, you clicked the lightning bolt in both fields, and ended up with this:

parameters_wrong.jpg

See the difference?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 09, 2012 Jul 09, 2012

Copy link to clipboard

Copied

LATEST

OK.  I typed the Name manually. But I neglected to hit the tab key twice to arrive at the Value input field.

Screenshot 1

CS6-parameters1.jpg

After hitting tab key twice, value field is in focus and 2nd lightening bolt appears.

CS6-parameters2.jpg

Gads!  No wonder people mess this up. 

Thanks, David.  I appreciate your clarification. 

Nancy O.

Nancy O'Shea— Product User, Community Expert & Moderator

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines