Re: [PHP] time in annother zone
just use GMT it is much simpler just kidding ?PHP $test = getenv(DATE_LOCAL); print($test); ? - Original Message - From: Justin French [EMAIL PROTECTED] To: php [EMAIL PROTECTED] Sent: Monday, September 10, 2001 2:07 AM Subject: [PHP] time in annother zone Greetings, I've been to the online manual relating to both date() and time(), and i've read all the user-added notes, and i'm actually MORE confused now than I was before I started!! My ISP is based in Ontario, Canada. Myself, and 90% of my users are based in Australia (Sydney/Melbourne time). I'm trying to show what time a post was added to a message board. It's easy enough using date(), but it shows the server's local time (of course), not the current time in Australia. Now, I could easily find out how many seconds behind the ISP is, and minus it from the unix timestamp, but I'm thinking there has to be an easier way :) eg: ? $secondsDifference = a really big number; date(your format string,time() - $secondsDifference); ? it could be setlocale(), or something else, i'm just not sure what to make of it all. Many thanks in advance, Justin French -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Rounding a number up
http://www.php.net/manual/en/function.ceil.php - Original Message - From: Brandon Orther [EMAIL PROTECTED] To: PHP User Group [EMAIL PROTECTED] Sent: Monday, September 10, 2001 2:19 PM Subject: [PHP] Rounding a number up Is there a way to round a number to the next whole number? Example: Before: 1.86758 After: 2 Thank you, -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] php help probably basic (used stripslashes but probably not the right way to do it)
I am having the following problem. I have a database that is setup as follows CREATE TABLE test ( id tinyint(4) NOT NULL auto_increment, text text NOT NULL , PRIMARY KEY (id) ) TYPE=MyISAM; I have a page after a form that confirms all data to be entered the html is as follows text=\test \'ve\ id=1 form action=./commitcard.php input type=hidden name=text value=\test I\'ve\ input type=hidden name=id value=1 input type=submit name=submit value=Commit to database! /form however in the next page I am doing a print of the insert statement for testing and all I get is the following insert into test (id,text) values ('1','\') I have tried the following $test = stripslashes($test); but it just gets worse any ideas would be helpful I am using php 4.0.6, apache 1.3.20, mysql 3.23.42, and Linux kernel 2.4.3 Lance Rochelle [EMAIL PROTECTED] http://ulands.idlegames.com (607) 775-2681 --- Being a Systems Administrator is like hitting yourself in the bead with a brick. After a while you don't feel the pain. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]