Re: redirecting and misc q's in general

"Stephen F. Booth" <[email protected]> Sat, 4 Dec 2004 01:05:37 -0500
Newsgroups gmane.comp.gcc.cgicc.general
Message-ID <[email protected]>
The following worked for me (using Cgicc's class):

<snip>
#include <iostream>

#include "cgicc/HTTPRedirectHeader.h"

int
main(int /*argc*/,
     char ** /*argv*/)
{
  std::cout << cgicc::HTTPRedirectHeader("http://www.google.com") << 
std::endl;

  return 0;
}
</snip>

It would be simple to modify the CGI above to read the page to redirect from 
the form input.  There is an even easier way, though:

<snip>
#!/bin/bash
echo "Location: $QUERY_STRING"
echo ""
</snip>

and just pass the URL after the '?', ie "redir.cgi?http://www.google.com"

As for multiple forms on one page, you can have as many as you would like but 
they cannot be nested.

I hope this helps, but I'm not sure if this is what you're after.

Stephen

On Tuesday 30 November 2004 18:08, Victor Carvajal wrote:
> Hello,
> I am having problems trying to use the HTTPRedirectHeader Class to redirect
> clients to a static html page. I dont want to use something like the
> following:
> meta().set("HTTP-EQUIV", "EXPIRES").set("CONTENT",
> "3").set("URL","http://www.whatever.com/redirect.html") << endl;
>
> If someone can provide a little snippet of code that would be great.
> Also, another question involved the following syntax:
> <form method =" post" action =" http://whatever.com/cgi-bin/login.cgi">
>
> Is it possible to have multiple form methods on one page?
> i.e if I had a button on the redirect.html to calculate pi(whose action i
> want to be called by a pi.cgi program) and another button on the same
> redirect.html to calculate or query an item from a DB( whoc actions is
> called by a query.cgi program). Is this possible?
>
>
>
> _______________________________________________
> help-cgicc mailing list
> [email protected]
> http://lists.gnu.org/mailman/listinfo/help-cgicc

_______________________________________________
help-cgicc mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-cgicc
signature.asc (application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQBBsVO0golXBOamItMRAqpiAJ4724RUvPm6YX9YJMREyLTnIqF/RACfYNNQ
TtTh6nJu/AUvhPIf7o1mrZQ=
=Zijp
-----END PGP SIGNATURE-----