Re: [PHP] Calculate # of minutes during working hours between two dates

2001-06-20 Thread Jon Rosenberg
sloppy psuedocode:(but you get the idea) numdays = date2 - date1 minperday = 60 * 9.5(hrs) totalminutes for interval = numdays * minperday - Original Message - From: "Wim Koorenneef" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, June 20, 2001 11:25 AM Subject: [PHP] Calcul

Re: [PHP] hdml simulator?

2001-05-04 Thread Jon Rosenberg
The up.sdk phone sim works for me with both wml and hdml as well. You just have to make sure you are sending the correct headers, etc... Jon - Original Message - From: "Data Driven Design" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, May 04, 2001 1:39 PM Subject: [PHP] hdm

[PHP] --register-globals - dev question

2001-05-04 Thread Jon Rosenberg
Can someone on the dev team remind me at what version --register-globals became the default way PHP works? I looked in the config manual, but it looks like that config optoin has been completely removed from the list. I think now it is in the php.ini file. Is this correct? Thanks Jon -- PH

Re: [PHP] php/mySql SELECT where clause using dates. ooops

2001-05-03 Thread Jon Rosenberg
i'm sorry, I looked at the wrong part. You need to use the PHP functions to convert your date to a timestamp, then subtract 30 days from it, then reconvert to a MySQL date format. Jon - Original Message - From: "Jon Rosenberg" <[EMAIL PROTECTED]> To: "Dan Es

Re: [PHP] php/mySql SELECT where clause using dates.

2001-05-03 Thread Jon Rosenberg
Take out the order by clause or chaqnge it. You can't order by a column you aren't selecting. - Original Message - From: "Dan Eskildsen" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, May 03, 2001 10:30 AM Subject: [PHP] php/mySql SELECT where clause using dates. > ***NEW

[PHP] re : date list

2001-05-01 Thread Jon Rosenberg
Thanks everyone for the help! -- 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] date list

2001-05-01 Thread Jon Rosenberg
I need to make a select list for a web page in the following format: 01/01/01-01/07/01 01/08/01-01/14/01 01/15/01-01/21/01 etc etc till the end of 2002 and further in the future eventually I'd like to make PHP generate this for me so I don't have to handcode it for each year in the future. I've

Re: [PHP] Your opinion on security issue: file extension

2001-05-01 Thread Jon Rosenberg
Not really, I mean it may deter a very novice hacker. But, if the people want in, they can very easily find out what server and server software you are running. For example, goto www.netcraft.com and click on 'What's that site running?' and put in your www.domain.com address. It will tell ou ev

Re: [PHP] timezones

2001-04-30 Thread Jon Rosenberg
http://www.worldtimeserver.com/ has them all..then you can just assign your constants to them in a way that makes sense to you - Original Message - From: "Joe Stump" <[EMAIL PROTECTED]> To: "Mark Maggelet" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Monday, Apr

Re: [PHP] timezones

2001-04-30 Thread Jon Rosenberg
This is how I do it: in DB: usertable username,etc,tzone where tzone = EST,PST,MNT,CNT when the user logs in just grab the tzone, register it in the session. Also make them constants, so you know if the server is in CA, then EST = 10800 now when they do something, all you have to do is calc the

Re: [PHP] MySQL broken in 4.0.5RC6

2001-04-09 Thread Jon Rosenberg
True...but I used the same php.ini as with php4.0.4pl1, so the location of all files is identical. If I don't specify a location in 4.0.4pl1, why should i need one in 4.0.5rc6? In theory if it's been working with no change since 4.0.3, I don't see why once again compiling with identical options

[PHP] MySQL broken in 4.0.5RC6

2001-04-09 Thread Jon Rosenberg
I know this belongs in the developers list..but for some reason, it's not allowing me to subscribwe, so I'm posting it here. When I upgrade to 4.0.5rc6, i get the following error: Warning: MySQL Connection Failed: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (111) in /hom

Re: [PHP] Select case equivelent

2001-04-04 Thread Jon Rosenberg
switch ($i) { case 0: print "i equals 0"; break; case 1: print "i equals 1"; break; case 2: print "i equals 2"; break; } - Original Message - From: "Allen May" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, April

Re: [PHP] Size Limit for PHP scripts

2001-03-30 Thread Jon Rosenberg
I have scripts over 150KB running just fine. Maybe it's your execution time that is too long, try raising it in php.ini and up it from 30 seconds. - Original Message - From: "Wally Hartshorn" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Friday, March 30, 2001 4

Re: [PHP] login without database

2001-03-30 Thread Jon Rosenberg
you could use flat files, another words store the user information in a text file like below: username|pass|email bob|fgffsdg|[EMAIL PROTECTED] foo|bar|[EMAIL PROTECTED] and then just read and write the file with PHP. Jon - Original Message - From: "Jan Grafström" <[EMAIL PROTECTED]>

Re: [PHP] sessions broken when redirected?

2001-03-29 Thread Jon Rosenberg
I don't know 100& for sure, but I believe since it is going to an https link, it considers it a new domain(or something) and that's why the sessions aren't persisting. The same thing happens if you redirect from say www.domain.com to www2.domain.com. I odn't know any way around it, except encodi

Re: [PHP] fatal error

2001-03-29 Thread Jon Rosenberg
what version of PHP are you using? - Original Message - From: "Theo Richel" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, March 29, 2001 8:08 AM Subject: [PHP] fatal error > Can anyone please tell me why I get the following message: Fatal error: Call > to unsupported or u

Re: [PHP] Q: php.ini

2001-03-28 Thread Jon Rosenberg
You need to restart your web server (apache, most likely). Jon - Original Message - From: "Joe Rice" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, March 28, 2001 11:34 AM Subject: [PHP] Q: php.ini > > > Hi, > I made a change to my php.ini and > phpinfo() doesn't re

Re: [PHP] removing $HTTP_POST_VARS

2001-03-28 Thread Jon Rosenberg
You could just check the referrer, as pseudo-code below shows. if refferer is not valid{ exit; } else{ do my stuff; } - Original Message - From: "Matt Williams" <[EMAIL PROTECTED]> To: "PHP General List" <[EMAIL PROTECTED]> Sent: Wednesday, March 28, 2001 9:20 AM Subject: [PHP]

Re: [PHP] Is it odd or even???

2001-03-05 Thread Jon Rosenberg
You could divide it by 2, odd numbers will always have a remainder even umbers never will. here are math functions, but none for odd/even that i see. Jon - Original Message - From: "Brandon Orther" <[EMAIL PROTECTED]> To: "PHP User Group" <[EMAIL PROTECTED]> Sent: Monday, March 05, 2001

Re: [PHP] switch statement

2001-02-25 Thread Jon Rosenberg
Here is a basic example. switch ($option) { case "optiona": statements; statements; break; case "optionb": statements; break; } - Original Message - From: "Peter Houchin" <[EMAIL PROTECTED]> To: "PHP MAIL GROUP" <[EMAIL PROTECTED]> Sent: Sunday, February 25, 2001 9:03 PM Subject: [

[PHP] session_register in function - addendum

2001-02-24 Thread Jon Rosenberg
The code snippet below is from a file that is the post action of a login form the login form also has session_start(); - Original Message - From: "Jon Rosenberg" <[EMAIL PROTECTED]> To: "PHP List" <[EMAIL PROTECTED]> Sent: Saturday, February

[PHP] session_register in function

2001-02-24 Thread Jon Rosenberg
The variable I register before the function becomes available in the session to other pages...the variable I register inside the function are not accessible in the session to ohter pages. Is this normal? How can I work around this? Thanks! PHP4.0.4pl1 on Linux. sample code: -- PHP Genera

[PHP] session question

2001-02-23 Thread Jon Rosenberg
I have a form that submits to abc.php which then calls db.php and db.php then redirects to a new URL. I have session_start(); on all these files and I'm registering the variables I need. It seems that the session dies or gets lost on it's way through all the included files. I then tried to pass

[PHP] session heads up

2001-02-16 Thread Jon Rosenberg
I just spent about 5 hours trying everything i could think of to get sessions to workends up it was a simple problem that I should have realized before i even started. So, learn my oversight, save yourself 5 hours of going nuts. I have several scripts that all pass vars between themselvesO

[PHP] MySQL 3.23

2001-02-09 Thread Jon Rosenberg
I'm about to upgrade to mysql 3.23 on a production installation on linux with PHP 4.0.4pl1, has anyone had any problems with this combination, as compared to 4.0.4pl1 with 3.22.xx? Thanks! Jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For add

Re: [PHP] 4.0.4 Postgres link resource bug?

2001-01-15 Thread Jon Rosenberg
It's b/c the globals in 4.0.4pl1 are not working, at least that's why mine broke. Try replacing the globals in the function with the actual variable declarations and see if the problem goes away. If not, I guess it's a different problem, but that fixed it for me. -

[PHP] globals broke

2001-01-11 Thread Jon Rosenberg
I just installed 4.0.4pl1 upgrade from 4.0.3pl1. I changed nothing in my ini file and just left it inplace from the previous installation. I used the same configure options, --with-apxs and --with-mysql Now, my global variables don't work in my functions. ie. $foo = "bar"; $rap = 7; function

Re: [PHP] killing the session

2001-01-11 Thread Jon Rosenberg
try this: session_unset(); - i think that's the one session_destroy(); - Jonathan Rosenberg Be fierce, be fabulous, change the world! - Original Message - From: "Angel Behar" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> S

[PHP] case ?

2001-01-10 Thread Jon Rosenberg
I know this is kinda silly. but, if I have the following, will the file only be included when the case is matched or does require always bring in the file regarless? case blah: require('include.php'); do something break; --

[PHP] strip_tags ?

2001-01-10 Thread Jon Rosenberg
Is there a list anywhere of hte tags this function will strip, I couldn't find it in the php manual? I want to know if there are any that might be left out. Thanks! - Jonathan Rosenberg Be fierce, be fabulous, change the world!

Re: [PHP] Sessions

2001-01-10 Thread Jon Rosenberg
It's using the path for unix to save the sessions, and it looks like you're on windows. Look for the path directive in the php.ini file and change it so only the windows path to the sessions save directory is there. - Jonathan Rosen

[PHP] input processor function

2001-01-10 Thread Jon Rosenberg
I want to process information submitted by a form, but I want to clean up the info before I use it. I have about 40 form fields, of several field types. If I only had a few form fields, I would do ths manually, but since I have so many my code will be much neater to do it with a function. I wa