in reply to POST from a hyperlink

You either have to use the submit button, or you have to use javascript. You can use something like the following, but I advise against it. It will break for anyone without javascript... and that can be a lot of people. Best to stick with normal links with GET content... that's what it's there for!

<form action="cgi2.cgi" name="frmGo" method="post"> <input type="hidden" name="variable2" value="value1" /> <a href="javascript:document.frmGo.submit()"> next page </a> </form>

Replies are listed 'Best First'.
Re: Re: POST from a hyperlink
by JoeJaz (Monk) on Apr 25, 2004 at 03:35 UTC
    Thanks for you advice. I am also leary about using javascript but I'll reconsider what type of data I send and perhaps use the GET statement as you suggest. Thanks again. Joe
      Note that data sent via POST is no more secure than data sent via GET. It's still data that's visible from the client-side. If you have data you need to keep secure, the best way is to not send it to the client at all. You will need sessions and a lot more infrastructure that's beyond the scope of my Sunday morning reply. :-)

      ------
      We are the carpenters and bricklayers of the Information Age.

      Then there are Damian modules.... *sigh* ... that's not about being less-lazy -- that's about being on some really good drugs -- you know, there is no spoon. - flyingmoose

        I'll keep that in mind. It's good to know that. Perhaps I will use cookies instead, though there are probably still a lot of security holes. Thanks for your input. Joe