[PHP] checking date is not greater than today

2002-06-30 Thread Timothy J. Luoma
I am trying to compare a given date string (i.e. June 30, 2002 is 20020630). I want to make sure that the input string that is given is not greater than today (i.e. if today is June 30, and you ask for 20020701, I want to be able to throw an error). I'm a newbie, so I'm not sure the best way

Re: [PHP] checking date is not greater than today

2002-06-30 Thread Timothy J. Luoma
On Sun, 30 Jun 2002, John Holmes wrote: $today = date(Ymd); if($input_date $today) { echo Date must be before today!; } *thwaps self* DUH! Thanks... been staring at this for too long. It looks like you're dealing with MySQL dates. There are a ton of useful functions you can use in

[PHP] Re: checking date is not greater than today

2002-06-30 Thread Timothy J. Luoma
On Mon, 1 Jul 2002, Peter J. Schoenster wrote: On 30 Jun 2002 at 22:31, Timothy J. Luoma wrote: I am trying to compare a given date string (i.e. June 30, 2002 is 20020630). I want to make sure that the input string that is given is not greater than today (i.e. if today is June 30

[PHP] Re: forcing file downloads

2002-06-13 Thread Timothy J. Luoma
On Wed, 12 Jun 2002, Justin French wrote: I know this has been discussed many times, but I've been hunting through the archives with very little resolution on the issue. The user can define certain things given the way they want mime types to be handled. PDF used to be a good solution until

[PHP] Re: Email validation

2002-06-13 Thread Timothy J. Luoma
On Wed, 12 Jun 2002, Pedro Pontes wrote: function checkEmail($strEMailAddress) { return eregi(^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)+$, $strEMailAddress); } You have it now :). I'm still learning my PHP regex... does the above allow someone to have a literal + in their

[PHP] Re: phpDocumentor version 1.1.0rc1 RELEASE ANNOUNCEMENT

2002-06-10 Thread Timothy J. Luoma
On Mon, 10 Jun 2002, Miguel Cruz wrote: On Sun, 9 Jun 2002, Greg Beaver wrote: June 9, 2002 RELEASE ANNOUNCEMENT phpDocumentor version 1.1.0rc1 http://www.phpdoc.org Best of all, with OSX IE 5.14, the page comes up completely blank. Well in Opera6/Win it's just a big mess, probably

[PHP] Re: Can a php script be placed within a stylesheet?

2002-06-10 Thread Timothy J. Luoma
On Mon, 10 Jun 2002, Andrew Brampton wrote: Yes you can place one in a style sheet you just need to tell apache (or whatever) that .css should be parsed by PHP, this can be done via a .htaccess or something similar... Here is a example in a .htaccess file: AddType application/x-httpd-php

[PHP] Re: Not php related - php.net logo in Netscape 7?

2002-06-07 Thread Timothy J. Luoma
I believe it is a favicon.ico MSIE started this and apparently Netscape/Mozilla now have them too. TjL -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Not php related - php.net logo in Netscape 7?

2002-06-07 Thread Timothy J. Luoma
Oh, I forgot to mention that it is a different way of indicating that a favicon to be used, which is found in the HEAD of the HTML document. link rel=shortcut icon href=/favicon.ico / This works in browsers other than IE, but I don't think that IE supports this TjL -- PHP General

[PHP] Store in XML - process w/ PHP - Display in XHTML ?

2002-05-30 Thread Timothy J. Luoma
Summary: I've been looking for a resource (book, website, etc) that will address how to write/store information in XML and deliver it as XHTML (using PHP for the processing), but haven't had much luck. I know a little bit of PHP (just enough to be dangerous, but also to recognize how cool it

[PHP] PHPApache config to not require ?

2002-05-21 Thread Timothy J. Luoma
Hello PHP'ers I am currently using the very cool PHPSlideshow(1) This gives me URLs that look like this: http://www.tntluoma.com/show.php?directory=nursery/ I would like to be able to have simpler URL like this: http://www.tntluoma.com/show/directory=nursery/ I was

[PHP] random quote script with flat file? (PHP Vault: Random Quote Script)

2002-05-18 Thread Timothy J. Luoma
I've been searching for some a little bit of PHP that will pull out one line from a flat text file and display it, changing it on reload. So far most of them use MySQL and the links that I did find all turn up 404... but one was called PHP Vault: Random Quote Script and it seemed like it would

Re: [PHP] random quote script with flat file? (PHP Vault: Random Quote Script)

2002-05-18 Thread Timothy J. Luoma
list($usec,$sec)=explode( ,microtime()); mt_srand($sec * $usec); $quotes = file(quotes); echo $quotes[mt_rand(0, (sizeof($quotes)-1))]; Yes!!! That works exactly! I love PHP! I love this list and look forward to the day when I can contribute something more than fascinating

[PHP] Re: Phone number validation

2002-04-07 Thread Timothy J. Luoma
I'd just add that validating international numbers against any sort of list is bound to lead to extreme annoyance. Even telephone companies have trouble keeping track of changes. Not to mention people who will just put in valid-format-but-false numbers when they are required No stranger

[PHP] Re: Newbie and includes

2002-04-06 Thread Timothy J. Luoma
On Sat, 6 Apr 2002, Dean Ouellette wrote: Newbie who has my include working with this ?php include ('includes/footer.php'); ? Problem is when I try to use this with files in other directories I use ?php include ('/includes/footer.php'); ? Then get file cannot be found. Is there a way

[PHP] Re: problems trying to use PHP to choose CSS

2002-03-31 Thread Timothy J. Luoma
On Sat, 30 Mar 2002, Hugh Bothwell wrote: Thanks to Hugh for his help... his PHP code was perfect... it was exactly what it took to get it done. Just a few minor notes: I was able to keep the echo EOD statements which I prefer for this particular implementation, and I kept form

[PHP] problems trying to use PHP to choose CSS

2002-03-29 Thread Timothy J. Luoma
Hello PHP friends I went searching (Core PHP Programm, php.net and google) for an answer, but didn't find anything that did what I want, namely: Use PHP to set the style sheet for a site. I am trying this method: Register a global variable ($CSS) using a FORM. Currently this does not

[PHP] need help converting code to more efficient loop

2002-03-09 Thread Timothy J. Luoma
Hello! I am trying to reduce the size of the code below, which I believe can be simplified. I checked the 'for' entry in the manual as well as googling for some similar code, but did not have any luck. Here is what I have: $ICON_COUNT=0; if ($SHOW_WAI_ICON != no) { $ICON_COUNT++ ;

[PHP] showing last mod. of *included* file

2002-03-01 Thread Timothy J. Luoma
I have been using this code to show the last modified time: (Note: the following was adapted from http://www.terrabyte.dc.com.au/phpscripts.php3 ) // the server is 13 hours ahead of Eastern Time USA $hourdiff = 13; $timeadjust = ($hourdiff * 60 * 60); $eastern_time = date(d M Y

[PHP] Re: showing last mod. of *included* file

2002-03-01 Thread Timothy J. Luoma
Use filemtime(). UGH! There are so many things to learn! I hate asking obvious questions like this, but I'm still not finding the right search terms. I appreciate your patience. FYI the answer to my problem was found at http://www.php.net/manual/en/function.filemtime.php [EMAIL PROTECTED]

[PHP] Re: Auto_prepend_file

2002-02-28 Thread Timothy J. Luoma
On Thu, 28 Feb 2002, Richard Baskett wrote: What I want to do is have a function available to all my php files without having to use an include in every page So what I did was put this line in my htaccess file: php auto_prepend_file pathtoscript/uniemailphp On my system I had to give the

[PHP] global variables w/o access to global php.ini

2002-02-27 Thread Timothy J. Luoma
Hello folks I have a virtual domain under Apache and do not have access to the global php.ini file Apache lets me set site-wide configuration in an /.htaccess file Is there something similar for PHP? All the references I've been able to find seem to refer to php.ini but do not say if I can

[PHP] Re: global variables w/o access to global php.ini

2002-02-27 Thread Timothy J. Luoma
On Wed, 27 Feb 2002, CC Zona wrote: I have a virtual domain under Apache and do not have access to the global php.ini file Apache lets me set site-wide configuration in an /.htaccess file Is there something similar for PHP? Forget similar, you can set PHP config options in the

[PHP] Re: Apache Server Side Includes mixed with PHP pages

2002-02-27 Thread Timothy J. Luoma
On Wed, 27 Feb 2002, Richie Chauhan wrote: !--include virtual=/includes/header.html-- ?php echo Hello; ? !--include virtual=/includes/footer.html-- FYI I think your SSI syntax is wrong, it should be !--#include virtual=/includes/header.html -- TjL ps -- I emailed Richie offlist

[PHP] Re: global variables w/o access to global php.ini

2002-02-27 Thread Timothy J. Luoma
On Wed, 27 Feb 2002, CC Zona wrote: In that case, the auto_prepend_file config option may be of interest It's described on the page previously mentioned Awesome that was just what I needed I hadn't made the connection before Thanks TjL -- PHP General Mailing List (http://wwwphpnet/) To

[PHP] My first piece of decent PHP (I think :-)

2002-02-25 Thread Timothy J. Luoma
Hello folks! I've been lurking the last 200 messages or so (i.e. 10-15 minutes ;-) I've already learned a lot, including that this list will be well worth the bandwidth. I hope my post will be worth the reading. I think I have my first contribution to make, and at the same time would like to