/t5/dreamweaver-discussions/in-php-how-to-pass-a-recordset-value-through-a-url/td-p/797641Mar 09, 2009
Mar 09, 2009
Copy link to clipboard
Copied
I have a blog set up with PHP/MySQL with two tables (1 table
for blog entry and 1 table for comments on the blog)
I can display the blog and the comment with a LEFT JOIN
recordset like this---
SELECT golf_blog.blog_ID, DATE_FORMAT(
golf_blog.blog_created, '%b %e, %Y') AS blog_created,
golf_blog.blog_author, golf_blog.blog_subject,
golf_blog.blog_article, blog_comments.comment_article
FROM golf_blog LEFT JOIN blog_comments USING (blog_ID)
ORDER BY golf_blog.blog_created ASC
I have a link in the repeat region of this recordset going to
a page with the comment insert form.
blog_ID is the primary key in the blog table and blog_ID is
the index in the comment table.
How do you pass the blog_ID from the recordset to a text
field in the comment insert form through the link?
Or am i even thinking about this in the right way?
thanks for your response
whether hidden field or text field is not what i am having a
problem with.
i am trying to get the URL link 'comment' to pass the blog_ID
to the comment page so that when the person fills in the comment
form and sends the insert, it has the correct blog_ID from the blog
page so i can JOIN the comment.blog_ID with the blog.blog_ID.