I have added the code, but it turn out :

"Warning: Cannot add header information - headers already sent by (output
started at C:\Inetpub\php\hospital_equipment.php:5) in
C:\Inetpub\php\hospital_equipment.php on line 6

Warning: Cannot add header information - headers already sent by (output
started at C:\Inetpub\php\hospital_equipment.php:5) in
C:\Inetpub\php\hospital_equipment.php on line 7

Warning: Cannot add header information - headers already sent by (output
started at C:\Inetpub\php\hospital_equipment.php:5) in
C:\Inetpub\php\hospital_equipment.php on line 9

Warning: Cannot add header information - headers already sent by (output
started at C:\Inetpub\php\hospital_equipment.php:5) in
C:\Inetpub\php\hospital_equipment.php on line 10
Equipments' Detail:-  "

I have tried to put the code in / before the <head>, but it still cant work
properly
why?
Here is my full HTML code:

<html>
<head>
<title>Equipments' Detail</title>
<head>
<STYLE>
body {scrollbar-face-color : #9ca6a5 ;
scrollbar-shadow-color : #eaebcf ;
scrollbar-darkshadow-color : #eaebcf ;
scrollbar-highlight-color : #eaebcf ;
scrollbar-3dlight-color : #eaebcf ;
scrollbar-track-color : #eaebcf ;
scrollbar-arrow-color : black}
</STYLE>
<meta http-equiv="Content-Type" content="text/html; charset=big5">
</head>

<body bgcolor="#FFFFFF" text="#000000" link="#000000" vlink="#000000"
alink="#000000">
<font face="Verdana, Arial, Helvetica, sans-serif" size="2">Equipments'
Detail</font>:- <div align="right">
<font face="Verdana, Arial, Helvetica, sans-serif" size="1">A = Available H
=
Hall N = Not in Hall</font>
<?

header ("Expires: Mon, 1 Jan 1990 05:00:00 GMT");    // Date in the past
header ("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
                                                      // always modified
header ("Cache-Control: no-cache, must-revalidate");  // HTTP/1.1
header ("Pragma: no-cache");

 mysql_connect ("localhost", "Administrator");
 mysql_select_db("Hospital");
 $sql = "select * from equipment";
 $row = mysql_query("$sql");
 ?><table width="80%" border="1" cellpadding="0" align="center"
cellspacing="2" bordercolor="#CCCCCC">
</div>
<tr bgcolor="#e5e5e5">
  <?

while ($head = mysql_fetch_field($row))
{ echo "<TD><B><font color=#666666 size=2 align=center
face=Verdana>$head->name</font></B></TD>"; }

echo "</TR>";


while ($field = mysql_fetch_row($row))
{
echo "<TR>";
for ($i = 0; $i <= count($field) - 1; $i++)
 {
  echo "<TD><font size=2 face=verdana>$field[$i]</font></TD>";

 }echo "</TR>";
}
echo "</table>";
if (!$row)
 echo "Failed";
 else
 { $num = mysql_num_rows($row);
 echo"<font size=1>equipment database has got $num data.</font>";
 }
 ?>
  </font>
<form name="form1" method="post" action="find_equipment.php">
  <font face="Verdana" size="1">Search individual
  equipment:</font>

 <INPUT onBlur="this.style.backgroundColor='#ffffff'"
onFocus="this.style.backgroundColor='#ffffcc'" onMouseOver=this.focus()
style="font-size:8pt;BACKGROUND-COLOR:#ffffff; BORDER-BOTTOM: #111111 1px
dotted; BORDER-COLLAPSE: collapse; BORDER-LEFT: #111111 1px dotted;
BORDER-RIGHT: #111111 1px dotted; BORDER-TOP: #111111 1px dotted"
maxLength=16 name=equipment size=12 type=text>

  <input type="submit" name="Submit" value="Find">
</form>
<tr bgcolor="#000000">
  <p></p>
  <font size="1" face="Verdana, Arial, Helvetica, sans-serif"><a
href="menu.html">Main
  Menu</a></font><font size="2"> <a href="loaned_equipment.php"><font
size="1" face="Verdana, Arial, Helvetica, sans-serif">Loaned
  Equipments</font></a></font> <a href="equipment_add.html"><font
face="Verdana, Arial, Helvetica, sans-serif" size="1">Add
  New Equipment </font></a>
<tr bgcolor="#000000">
</body>
</html>

"The_radix" <[EMAIL PROTECTED]> wrote in message
000501c08528$6d880270$3300a8c0@oracle">news:000501c08528$6d880270$3300a8c0@oracle...
> You could use Headers to tell the browser to expire the page "now"..
>
>
> header ("Expires: Mon, 1 Jan 1990 05:00:00 GMT");    // Date in the past
> header ("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
>                                                       // always modified
> header ("Cache-Control: no-cache, must-revalidate");  // HTTP/1.1
> header ("Pragma: no-cache");
>
>
> something like that should do it..
>
> See if it works now..
>
>
>
>
> ----- Original Message -----
> From: "Simonk" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Sunday, April 28, 2002 7:50 PM
> Subject: [PHP] Auto refresh when data changed in Mysql
>
>
> > I have made a php + mysql site and hosting in my own IIS server, but in
my
> > school network, The page didnt change when i changed the data in mysql
> > server. I think is the cache problem, but i cant fix it even i tick the
> > "Update the page everytime when page load" in IE.
> > There is no such problem in any home pc. but only in my school's pcs
> > but when i type in www.xxxx.com/showdata.php????
> > then the page can be update.
> > Is there any code or setting can be set to over come this problem?
> >
> > Thank you!
> >
> >
> >
> > --
> > 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

Reply via email to