[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [help-cgicc] redirecting and misc q's in general
From: |
Stephen F. Booth |
Subject: |
Re: [help-cgicc] redirecting and misc q's in general |
Date: |
Sat, 4 Dec 2004 01:05:37 -0500 |
User-agent: |
KMail/1.7.1 |
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
> address@hidden
> http://lists.gnu.org/mailman/listinfo/help-cgicc
pgp7dnyASwDBW.pgp
Description: PGP signature
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [help-cgicc] redirecting and misc q's in general,
Stephen F. Booth <=