[PHP] Printing function in PHP?

2002-05-01 Thread Simonk

Is there any printing function in the PHP?
Im currently making a project and required me to print out a page at
somepoint

but I probably cant use the Browser's print function but only a button in
the page said
Print.-_-

In pascal, I can use something like notepad.exe -p /test.dat to print out
a page
how can i do in the PHP?

Thank you very much!



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




Re: [PHP] Printing function in PHP?

2002-05-01 Thread Simonk

Or a command which send document to the browser's print?

Nick Wilson [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1


 * and then Simonk declared
  Is there any printing function in the PHP?

 Nope. Server side, not client side.

  but I probably cant use the Browser's print function but only a button
in
  the page said
  Print.-_-

 That would seem your best course... :-)
 - --
 Nick Wilson //  www.explodingnet.com



 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.0.6 (GNU/Linux)

 iD8DBQE80Ec/HpvrrTa6L5oRAnI8AKCBquhcrcwjGgfMeE+hgKprUNsnBwCfUBPh
 Cym//CEibVdb5rQ3Djvu8S4=
 =4n02
 -END PGP SIGNATURE-



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




[PHP] Auto refresh when data changed in Mysql

2002-04-28 Thread Simonk

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..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




Re: [PHP] Auto refresh when data changed in Mysql

2002-04-28 Thread Simonk

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
titleEquipments' 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=#FF text=#00 link=#00 vlink=#00
alink=#00
font face=Verdana, Arial, Helvetica, sans-serif size=2Equipments'
Detail/font:- div align=right
font face=Verdana, Arial, Helvetica, sans-serif size=1A = 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=#CC
/div
tr bgcolor=#e5e5e5
  ?

while ($head = mysql_fetch_field($row))
{ echo TDBfont color=#66 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 TDfont size=2 face=verdana$field[$i]/font/TD;

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

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

  input type=submit name=Submit value=Find
/form
tr bgcolor=#00
  p/p
  font size=1 face=Verdana, Arial, Helvetica, sans-serifa
href=menu.htmlMain
  Menu/a/fontfont size=2 a href=loaned_equipment.phpfont
size=1 face=Verdana, Arial, Helvetica, sans-serifLoaned
  Equipments/font/a/font a href=equipment_add.htmlfont
face=Verdana, Arial, Helvetica, sans-serif size=1Add
  New Equipment /font/a
tr bgcolor=#00
/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..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




[PHP] Php Config OCX missing in IIS Win2k

2002-04-14 Thread Simonk

When I install php after installing the IIS under win2k
The setup said  Due to missing OCX control , the automatic configuration
can not be done.  ...-_-
how can I fix this problem?
I dont have this problem before, but after formatting my hard drive and
reinstall win2k
this appear.
plz help!
(Dont tell me to config myself, I tried so many time and spend too many
hrs...but failed!)

__ ¦èªù³½
SeeMon Simonk ICQ#: 25943733 Current ICQ status: + More ways to contact me i
See more about me:
__



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




[PHP] Php Config OCX missing in IIS Win2k

2002-04-14 Thread Simonk

When I install php after installing the IIS under win2k
The setup said  Due to missing OCX control , the automatic configuration
can not be done.  ...-_-
how can I fix this problem?
I dont have this problem before, but after formatting my hard drive and
reinstall win2k
this appear.
plz help!
(Dont tell me to config myself, I tried so many time and spend too many
hrs...but failed!)
__



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




[PHP] Php + Mysql Hosting problem

2002-04-10 Thread Simonk

I have made a web site containing Php and Mysql script
And I have applied for a free web hosting account in www.spaceports.com
there are two folder i can use:

Public_html
Cgi-bin

which one i should put mysql files in?
and what user name and password should i use for connecting mysql server?
the current setting is
mysql_connect (localhost, Administrator);

thank you! and which free hosting is recommanded for php + mysql?
I can only found this spaceports free!
Thank you very much!

__ ¦èªù³½
SeeMon Simonk ICQ#: 25943733 Current ICQ status: + More ways to contact me i
See more about me:
__



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




[PHP] Can I use php to Print a document?

2002-04-05 Thread Simonk

Is there any functions or command that I can print out a page or a document
without using the browsers' print?



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




[PHP] Help with Function parameter

2002-04-04 Thread Simonk

I have programed a function for counting Date:

function Datereturn()
  {
   $monthorder = Array ( 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
$day = Date(j);
$monthday = Date(t);
  $month = Date(n);
  $year = Date(Y);
  $current = 42 - ($monthday - $day);
  if ($current  $monthorder[$month])
   { $realday = $current - $monthorder[$month];
$month = $month + 2;
 if ($month  12)
  { $year = $year + 1;
   $month = $month - 12; }
   }
  else
   { $realday = $current;
$month = $month + 1;
 if ($month  12)
  { $year = $year + 1;
   $month = $month - 12; }   }
  Return $realday;
  Return $month;
  Return $year;
   }


But when I want to echo out the result, I have typed:

Datereturn();
echo $year, $month, $realday;

Then the server return:
Undefined variable year, month, realday

plz help!





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




[PHP] Help with Function parameter

2002-04-04 Thread Simonk

I have programed a function for counting Date:

function Datereturn()
  {
   $monthorder = Array ( 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
$day = Date(j);
$monthday = Date(t);
  $month = Date(n);
  $year = Date(Y);
  $current = 42 - ($monthday - $day);
  if ($current  $monthorder[$month])
   { $realday = $current - $monthorder[$month];
$month = $month + 2;
 if ($month  12)
  { $year = $year + 1;
   $month = $month - 12; }
   }
  else
   { $realday = $current;
$month = $month + 1;
 if ($month  12)
  { $year = $year + 1;
   $month = $month - 12; }   }
  Return $realday;
  Return $month;
  Return $year;
   }


But when I want to echo out the result, I have typed:

Datereturn();
echo $year, $month, $realday;

Then the server return:
Undefined variable year, month, realday

plz help!







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