You are here: Re: [PHP] Quite a basic question « PHP « IT news, forums, messages
Re: [PHP] Quite a basic question

Posted by Jochem Maas on 03/08/05 17:42

Mário Gamito wrote:
> Hi,
>
> This is quite a very basic question, but i think the code following my
> signature should work.
> Instead, i get a
> "Warning: Cannot modify header information - headers already sent by
> (output started at /home/vhosts/dte/cv/register_action.php:10) in
> /home/vhosts/dte/cv/register_action.php on line 12"
>
> and no redirection :(
>
> How can i solve this ?
> Any help would be apreciated.

you've already been told why this won't work. I just add that in order
to open a popup to 'google' (or where ever) and 'redirect' the page to
http://www.dte.ua.pt/cv/ you are going to have to 'redirect' using javascript
or a 'meta refresh' ... you can't redirect with php in this scenario?

(at least I can't think how - and I have already proved my fallibility to
the list :-) - maybe there is a way, anybody?)

Mario, maybe spend a little more time with the manual? - the problem you had/have
is described in depth... the manual is you best friend (ok google is just _best_
friend but when it comes to php the manual comes a close 2nd).

goodluck :-)

>
> Warm Regards,
> Mário Gamito
>
> <?php
>
> $hostname = gethostbyaddr($_SERVER['REMOTE_ADDR']);
> $sub_domain = explode (".", $hostname);
> if ($sub_domain[1] != 'dte') {
> echo"
> <script language=\"JavaScript\">
> window.open (\"http://www.google.com\", \"mywindow\", \"status=1,
> toolbar=0, resizable=0,
> width=200, height=200\");

maybe adding this?:

window.location = 'http://www.dte.ua.pt/cv/';

> </script>";
> }

add remove the call to header:

> header("Location: http://www.dte.ua.pt/cv/");
> ?>
>
> <HTML>
> <HEAD>
> <TITLE>Gestão de currículos do DDTE</TITLE>
> (...)
>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация