Re: Call HTML from php
| From: | Anna Gyor | Date: | Tue, 01 Oct 2002 20:35:25 +0000 |
| Subject: | Re: Call HTML from php | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-118426@lists.php.net to get a copy of this message | ||
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" <j.wards@sportnetwork.net> az alábbiakat írta a következo
hírüzenetben: OE38gZe0J64TBU25JJz000084ff@hotmail.com...
> header("location:http://yourstuff");
>
> Do this before any output to the user. eg echos or displaying html
>
> John
> ----- Original Message -----
> From: "Anna Gyor" <bali1a@freemail.hu>
> To: <php-general@lists.php.net>
> 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