[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):

#include <iostream>

#include "cgicc/HTTPRedirectHeader.h"

main(int /*argc*/,
     char ** /*argv*/)
  std::cout << cgicc::HTTPRedirectHeader("";) << 

  return 0;

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:

echo "Location: $QUERY_STRING"
echo ""

and just pass the URL after the '?', ie "redir.cgi?";

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.


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","";) << 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 ="";>
> 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

Attachment: pgp7dnyASwDBW.pgp
Description: PGP signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]