Re: CGI with hyperlink
- Posted by jimcbrown (admin) Dec 26, 2010
- 1706 views
I am currently using Euphoria, mysql, and CGI to access my cooking recipe database online. I have a simple form where a user can search recipes by different criteria, and the EU code returns an HTML page with the results. What I would like is for the results to have the ingredients as hyperlinks, so when clicked can search the database for other recipes with that ingredient. An example result would be:
Recipe Name | Katsu Pork |
Ingredient | Pork |
Ingredient | Rice |
Can I setup another form that uses the hyperlinks somehow as the post criteria? Or is there another method?
Happy Holidays!
- Ira
The nicest way is just to modify your CGI to be able to accept HTTP GET as well as HTTP POST, and then the hyperlink would just go to "/cgi.ex?search=Pork"
Alternatively, you can use javascript to create a hyperlink that can send a true HTTP POST request.
See http://mentaljetsam.wordpress.com/2008/06/02/using-javascript-to-post-data-between-pages/