[PHP] Call HTML from php

2002-10-01 Thread Anna Gyor

Hi,

how can I call a html site from my php script? I want to redirect the user
to different html site depends on the php script result.

Thanks!




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Call HTML from php

2002-10-01 Thread Adam Williams

www.php.net/header

Adam


On Tue, 1 Oct 2002, Anna Gyor wrote:

 Hi,

 how can I call a html site from my php script? I want to redirect the user
 to different html site depends on the php script result.

 Thanks!







-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Call HTML from php

2002-10-01 Thread John W. Holmes

 how can I call a html site from my php script? I want to redirect the
user
 to different html site depends on the php script result.

Header(Location: http://www.domain.com/page.html;);

---John Holmes...



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Call HTML from php

2002-10-01 Thread John Wards

header(location:http://yourstuff;);

Do this before any output to the user. eg echos or displaying html

John
- Original Message -
From: Anna Gyor [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, October 01, 2002 8:40 PM
Subject: [PHP] Call HTML from php


 Hi,

 how can I call a html site from my php script? I want to redirect the user
 to different html site depends on the php script result.

 Thanks!




 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Call HTML from php

2002-10-01 Thread Anna Gyor

First thanks a lot, but

I have the following code:

?
$database=PH;
mysql_connect(localhost,test,test);
@mysql_select_db($database);
$query = SELECT ph_user.FIRST_NAME, FROM ph_user  WHERE (ph_user.FIRST_NAME
= \test\  );
$result=mysql_query($query);
$num=mysql_num_rows($result);
mysql_close();
if ($num  0){ Header(Location: file://c:/Test/company.html); }
else { Header(Location: file://c:/Test/register.html); }
?

And I become an error message:

Warning: Cannot add header information - headers already sent by (output
started at C:\Program Files\Apache Group\Apache2\htdocs\redirect.php:3) in
C:\Program Files\Apache Group\Apache2\htdocs\redirect.php on line 11

What can I do?

Thanks!


John Wards [EMAIL PROTECTED] az alábbiakat írta a következo
hírüzenetben: [EMAIL PROTECTED]
 header(location:http://yourstuff;);

 Do this before any output to the user. eg echos or displaying html

 John
 - Original Message -
 From: Anna Gyor [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Tuesday, October 01, 2002 8:40 PM
 Subject: [PHP] Call HTML from php


  Hi,
 
  how can I call a html site from my php script? I want to redirect the
user
  to different html site depends on the php script result.
 
  Thanks!
 
 
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Call HTML from php

2002-10-01 Thread John Wards

what is on line 3?

is the ? tag online 1?

- Original Message -
From: Anna Gyor [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, October 01, 2002 9:35 PM
Subject: Re: [PHP] Call HTML from php


 First thanks a lot, but

 I have the following code:

 ?
 $database=PH;
 mysql_connect(localhost,test,test);
 @mysql_select_db($database);
 $query = SELECT ph_user.FIRST_NAME, FROM ph_user  WHERE
(ph_user.FIRST_NAME
 = \test\  );
 $result=mysql_query($query);
 $num=mysql_num_rows($result);
 mysql_close();
 if ($num  0){ Header(Location: file://c:/Test/company.html); }
 else { Header(Location: file://c:/Test/register.html); }
 ?

 And I become an error message:

 Warning: Cannot add header information - headers already sent by (output
 started at C:\Program Files\Apache Group\Apache2\htdocs\redirect.php:3) in
 C:\Program Files\Apache Group\Apache2\htdocs\redirect.php on line 11

 What can I do?

 Thanks!


 John Wards [EMAIL PROTECTED] az alábbiakat írta a következo
 hírüzenetben: [EMAIL PROTECTED]
  header(location:http://yourstuff;);
 
  Do this before any output to the user. eg echos or displaying html
 
  John
  - Original Message -
  From: Anna Gyor [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Tuesday, October 01, 2002 8:40 PM
  Subject: [PHP] Call HTML from php
 
 
   Hi,
  
   how can I call a html site from my php script? I want to redirect the
 user
   to different html site depends on the php script result.
  
   Thanks!
  
  
  
  
   --
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, visit: http://www.php.net/unsub.php



 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Fw: [PHP] Call HTML from php

2002-10-01 Thread Kevin Stone

ob_start();
// your code..
ob_end_flush();

http://www.php.net/manual/en/ref.outcontrol.php

-Kevin

- Original Message -
From: Anna Gyor [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, October 01, 2002 2:35 PM
Subject: Re: [PHP] Call HTML from php


 First thanks a lot, but

 I have the following code:

 ?
 $database=PH;
 mysql_connect(localhost,test,test);
 @mysql_select_db($database);
 $query = SELECT ph_user.FIRST_NAME, FROM ph_user  WHERE
(ph_user.FIRST_NAME
 = \test\  );
 $result=mysql_query($query);
 $num=mysql_num_rows($result);
 mysql_close();
 if ($num  0){ Header(Location: file://c:/Test/company.html); }
 else { Header(Location: file://c:/Test/register.html); }
 ?

 And I become an error message:

 Warning: Cannot add header information - headers already sent by (output
 started at C:\Program Files\Apache Group\Apache2\htdocs\redirect.php:3) in
 C:\Program Files\Apache Group\Apache2\htdocs\redirect.php on line 11

 What can I do?

 Thanks!


 John Wards [EMAIL PROTECTED] az alábbiakat írta a következo
 hírüzenetben: [EMAIL PROTECTED]
  header(location:http://yourstuff;);
 
  Do this before any output to the user. eg echos or displaying html
 
  John
  - Original Message -
  From: Anna Gyor [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Tuesday, October 01, 2002 8:40 PM
  Subject: [PHP] Call HTML from php
 
 
   Hi,
  
   how can I call a html site from my php script? I want to redirect the
 user
   to different html site depends on the php script result.
  
   Thanks!
  
  
  
  
   --
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, visit: http://www.php.net/unsub.php



 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Call HTML from php

2002-10-01 Thread Anna Gyor

I hev deleted the row:
$num=mysql_num_rows($result);
which generates an error message (the output, what you said)  and now the
script works!

Thanks!


John Wards [EMAIL PROTECTED] az alábbiakat írta a következo
hírüzenetben: [EMAIL PROTECTED]
 what is on line 3?

 is the ? tag online 1?

 - Original Message -
 From: Anna Gyor [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Tuesday, October 01, 2002 9:35 PM
 Subject: Re: [PHP] Call HTML from php


  First thanks a lot, but
 
  I have the following code:
 
  ?
  $database=PH;
  mysql_connect(localhost,test,test);
  @mysql_select_db($database);
  $query = SELECT ph_user.FIRST_NAME, FROM ph_user  WHERE
 (ph_user.FIRST_NAME
  = \test\  );
  $result=mysql_query($query);
  $num=mysql_num_rows($result);
  mysql_close();
  if ($num  0){ Header(Location: file://c:/Test/company.html); }
  else { Header(Location: file://c:/Test/register.html); }
  ?
 
  And I become an error message:
 
  Warning: Cannot add header information - headers already sent by (output
  started at C:\Program Files\Apache Group\Apache2\htdocs\redirect.php:3)
in
  C:\Program Files\Apache Group\Apache2\htdocs\redirect.php on line 11
 
  What can I do?
 
  Thanks!
 
 
  John Wards [EMAIL PROTECTED] az alábbiakat írta a következo
  hírüzenetben: [EMAIL PROTECTED]
   header(location:http://yourstuff;);
  
   Do this before any output to the user. eg echos or displaying html
  
   John
   - Original Message -
   From: Anna Gyor [EMAIL PROTECTED]
   To: [EMAIL PROTECTED]
   Sent: Tuesday, October 01, 2002 8:40 PM
   Subject: [PHP] Call HTML from php
  
  
Hi,
   
how can I call a html site from my php script? I want to redirect
the
  user
to different html site depends on the php script result.
   
Thanks!
   
   
   
   
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Call HTML from php

2002-10-01 Thread John W. Holmes

Why not fix the problem instead of working around it. 

I think you already solved this, but the error message tells you exactly
what's wrong. Headers are sent when you output anything to the browser,
and your output started on redirect.php:3, that means line 3. 

---John Holmes...

 -Original Message-
 From: Kevin Stone [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, October 01, 2002 4:44 PM
 To: [EMAIL PROTECTED]
 Subject: Fw: [PHP] Call HTML from php
 
 ob_start();
 // your code..
 ob_end_flush();
 
 http://www.php.net/manual/en/ref.outcontrol.php
 
 -Kevin
 
 - Original Message -
 From: Anna Gyor [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Tuesday, October 01, 2002 2:35 PM
 Subject: Re: [PHP] Call HTML from php
 
 
  First thanks a lot, but
 
  I have the following code:
 
  ?
  $database=PH;
  mysql_connect(localhost,test,test);
  @mysql_select_db($database);
  $query = SELECT ph_user.FIRST_NAME, FROM ph_user  WHERE
 (ph_user.FIRST_NAME
  = \test\  );
  $result=mysql_query($query);
  $num=mysql_num_rows($result);
  mysql_close();
  if ($num  0){ Header(Location: file://c:/Test/company.html); }
  else { Header(Location: file://c:/Test/register.html); }
  ?
 
  And I become an error message:
 
  Warning: Cannot add header information - headers already sent by
(output
  started at C:\Program Files\Apache
Group\Apache2\htdocs\redirect.php:3)
 in
  C:\Program Files\Apache Group\Apache2\htdocs\redirect.php on line 11
 
  What can I do?
 
  Thanks!
 
 
  John Wards [EMAIL PROTECTED] az alábbiakat írta a
következo
  hírüzenetben: [EMAIL PROTECTED]
   header(location:http://yourstuff;);
  
   Do this before any output to the user. eg echos or displaying html
  
   John
   - Original Message -
   From: Anna Gyor [EMAIL PROTECTED]
   To: [EMAIL PROTECTED]
   Sent: Tuesday, October 01, 2002 8:40 PM
   Subject: [PHP] Call HTML from php
  
  
Hi,
   
how can I call a html site from my php script? I want to
redirect
 the
  user
to different html site depends on the php script result.
   
Thanks!
   
   
   
   
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php