in reply to How do I link in CGI?

Well, I think you need to be slightly more clear in your intended usage of the 'link'. I dont quite follow you on your reasoning for creating a link, and when, programmtically, you would need a "link" a la href tag? If you could be more specific, (explain what you are trying to do), I think an answer can be formulated.


Thanx
E-Bitch

Replies are listed 'Best First'.
Re: Re: How do I link in CGI?
by Anonymous Monk on Jul 11, 2001 at 23:41 UTC
    E-Bitch, I have a script that allows users to authenticate, once authenticated/not authenticated users need to be linked to either an error message or an appropriate place. Currently, I am able to get the user to authenticate, however once they do that, they just a message stateing XYZ. Rather that getting that message, I want the user to go somewhere else, lets say, "authenticated.htm". hope this is clearer. Thanks P.A.P
      If you are using basic authentication on the Apache webserver then what you are asking is not possible without recompiling Apache to support custom authentication.

      Apache pops up a little dialogue box when you log in. If your login fails then nothing happens. If your login succeeds then you go where you want to go.

      Those are your choices. If you want a customized error screen you are out of luck unless you recompile.

      Unfortunately, I am rather unfamilar with CGI, but I do know (or think I know) that that would be a redirect (i think). I know with JSPs that you can use response.sendRedirect("somepagehere") (or something similar). I would be surprised if CGI coudnt do the same thing. Anybody help out and confirm this?


      thanks!
      E-Bitch
      adendum: or better yet, you could shoot out a meta redirect tag like this:

      <META HTTP-EQUIV='refresh' CONTENT="0;URL='http://www.whatever.com/sub +mitsuccessful.html'">

      in the head. Its a bit of a hack, but it would work.