Solved

How do you insert a record from a link instead of a form?

Posted on 2006-06-26
4
171 Views
Last Modified: 2010-04-25
I am using Dreamweaver 8, PHP and mysql.

I am having trouble figuring out how to insert a record using a link and not a form.

After a search is completed, I want the user to be able to click a link and add the  id(primary key) of the results to a different database.

Is there a built in function to do this? If not, how would I code this functionality?

Thanks alot.




0
Comment
Question by:hep516
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 70

Accepted Solution

by:
Jason C. Levine earned 500 total points
ID: 16987503
Hi hep516,

What you need to do is add the primary key for the search results to the url of the link.  So you will have something in the repeat region that looks like this:

<a href="addme.php?id=<?php echo $your_recordset['id']; ?>">Add me!</a>

Next, you create the addme.php page and all it does is accept the $_GET['id'] (the query string) and use an Insert behavior to add it wherever.  Then return the user to the search page.  This is the easiest way.
0
 

Author Comment

by:hep516
ID: 16987574
Thanks!
0
 

Author Comment

by:hep516
ID: 16987608
Jason- You are a great help, I really appreciate it!
0
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 16987712
Aw, shucks.  I blush.

No thanks are necessary...I volunteer because I enjoy it and it helps keep me sharp.

Good luck with the project.  Let me know if/when it goes live, I'd love to see how it ends up.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

For those who don't know, Adobe Dreamweaver is a popular commercial web editor that enables you to design, build and manage complex websites. The editor is a WYSIWYG (What You See Is What You Get) web editor, which means that you can create your web…
Adobe Dreamweaver CS5 is a WYSIWYG web page editor that has advanced HTML, CSS, and Javascript rendering functionality and is probably the most well-known HTML editor available. Much of Dreamweaver's appeal centers around the Design View interfac…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question