[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
Re: [PHP] Auto refresh when data changed in Mysql
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 , but it still cant work properly why? Here is my full HTML code: Equipments' Detail 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} Equipments' Detail:- A = Available H = Hall N = Not in Hall $head->name"; } echo ""; while ($field = mysql_fetch_row($row)) { echo ""; for ($i = 0; $i <= count($field) - 1; $i++) { echo "$field[$i]"; }echo ""; } echo ""; if (!$row) echo "Failed"; else { $num = mysql_num_rows($row); echo"equipment database has got $num data."; } ?> Search individual equipment: Main Menu Loaned Equipments Add New Equipment "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] Printing function in PHP?
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?
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] Help with " Function " parameter
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
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] Can I use php to " Print " a document?
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] Php + Mysql Hosting problem
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] Php Config " OCX missing " in IIS Win2k
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
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