On Wed, 7 Feb 2001 13:27, Jeff Oien wrote:
> I have the code below within a larger web page which is
> like a portal. When I submit the form, I get this message:
>
> --------
> Warning: Cannot add header information - headers already sent by (output
> started at c:\apache\htdocs\index1.php3:9)
> --------
>
> Can I get it to take me to the BigCharts site and leave the
> page I'm on? Thanks.
> Jeff Oien
>
> --------
> <?php
>
> print "<form method=\"post\" action=\"$PHP_SELF\">";
> print "Symbol<br>";
> print "<input type=\"Text\" size=\"5\" name=\"symbol\"><br>";
> print "<INPUT type=\"hidden\" name=\"op\" value=\"ds\">";
> print "<input type=\"Submit\" value=\"Chart\">";
>
> if ($op == "ds") {
> $url = 'http://www.bigcharts.com/quickchart/quickchart.asp?symb= .
> $symbol'; header ("Location: $url");
> }
> ?>
If you are going to use header, you _must_ make sure that nothing is output
to the server, not even white space or blank lines, before the header
function is called.
--
David Robley | WEBMASTER & Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES | http://www.nisu.flinders.edu.au/
AusEinet | http://auseinet.flinders.edu.au/
Flinders University, ADELAIDE, SOUTH AUSTRALIA
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]