CGI output to null?

T

Thom White

Hi, I hope someone can help with this - I'm rubbish at programming, and
I'm stuck......

I use a (perl) CGI script to collect form data on our website, and email
it to me. When it collects the data, it shows a thankyou.html page to
the visitor. No problem.

Now, I want to alter this script so that it doesn't send anything back
(it will be accessed from an HTML email), but if I strip out the:

print "Location: /thanks.html", "\n\n";

...line, I get an Internal Server Error.

Is there a way I can satisfy the script's need to reply, but send the
information to Null, or whatever? Help?

Thom
 
T

Tintin

Thom White said:
Hi, I hope someone can help with this - I'm rubbish at programming, and
I'm stuck......

I use a (perl) CGI script to collect form data on our website, and email
it to me. When it collects the data, it shows a thankyou.html page to the
visitor. No problem.

Now, I want to alter this script so that it doesn't send anything back (it
will be accessed from an HTML email), but if I strip out the:

print "Location: /thanks.html", "\n\n";

..line, I get an Internal Server Error.

Is there a way I can satisfy the script's need to reply, but send the
information to Null, or whatever? Help?

Not a Perl question (apart from the use of 'print', which I'm sure you can
handle).

print "Content-Type: text/plain\n\n";
 
T

Thom White

Not a Perl question (apart from the use of 'print', which I'm sure you can
handle).

print "Content-Type: text/plain\n\n";

Thanks - I'll give it a go.

Thom
 
G

Gunnar Hjalmarsson

Tintin said:
Not a Perl question (apart from the use of 'print', which I'm sure you can
handle).

print "Content-Type: text/plain\n\n";

That results in blank page, doesn't it?

I think it's this the OP is after:

print "Status: 204 No Content\n\n";
 
T

Thom White

Gunnar said:
That results in blank page, doesn't it?

I think it's this the OP is after:

print "Status: 204 No Content\n\n";

This also results in a blank page.

Meh, I've stopped fighting it - I've gone back to letting the form
return an HTML response.

Thanks though.

Thom
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,172
Messages
2,570,933
Members
47,472
Latest member
blackwatermelon

Latest Threads

Top