Solved

Redirecting after form submission

Posted on 2006-06-09
2
194 Views
Last Modified: 2013-12-25
Based on what I know about Perl, I've come to the realization that you can't use "redirect" in the same Perl script where you also print an HTML header.  If you do, the "print redirect" command gets printed to the browser instead of being interpreted as a command.  If this is true, is there any way to use the redirect command in the same Perl script that uses the print->header() or other HTML header command?

Thanks.

0
Comment
Question by:marcparillo
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 8

Accepted Solution

by:
Perl_Diver earned 250 total points
ID: 16872596
You can't redirect unless you have not yet printed the full header. You need to either print the header later or print the redirection sooner. How you do that depends on your script and what you are trying to do.
0
 
LVL 3

Author Comment

by:marcparillo
ID: 16875044
Thanks -- that's what I figured.
0

Featured Post

How To Reduce Deployment Times With Pre-Baked AMIs

Even if we can't include all the files in the base image, we can sometimes include some of the larger files that we would otherwise have to download, and we can also sometimes remove the most time-consuming steps. This can help a lot with reducing deployment times.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Making a simple AJAX shopping cart Couple years ago I made my first shopping cart, I used iframe and JavaScript, it was very good at that time, there were no sessions or AJAX, I used cookies on clients machine. Today we have more advanced techno…
It is becoming increasingly popular to have a front-page slider on a web site. Nearly every TV website,  magazine or online news has one on their site, and even some e-commerce sites have one. Today you can use sliders with Joomla, WordPress or …
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question