[PHP] Re: [BULK] RE: [PHP] Re: [BULK] [PHP] Redirecting to a parent page

2007-06-13 Thread clive
Yamil Ortega wrote: Ok, but what happens if I change server and there is no more apache2 directory? Do I have to change all the headers in my 37 web pages? do this: // in a config file, or header file $sitename = "http:/localhost/apache2/"; eader file // whereever it is needed header("Locat

RE: [PHP] PHP list as a blog

2007-06-13 Thread Paul Scott
On Wed, 2007-06-13 at 13:13 -0500, Richard Lynch wrote: > On Tue, June 12, 2007 11:39 pm, Paul Scott wrote: > It's a blog. > > People type things. > Not quite anymore... I have added our set of filters to the output now, so that you can add in bbcode tags as well as a number of other things, l

[PHP] SimpleXMLElement->xpath() on php 5.1 - weird blocking problem

2007-06-13 Thread David CHANIAL
Hi (sorry for my bad english), It's descibed at http://fr3.php.net/manual/en/function.simplexml-element-xpath.php that SimpleXMLElement->xpath() is avaiable on php-5.2.0 at least. But, in fact, on one of my box with php-5.1.6-pl11-gentoo, libxml2-2.6.27, libxslt-1.1.17 xpath() is running..

Re: [PHP] php / mysql performance resources

2007-06-13 Thread Robert Cummings
On Wed, 2007-06-13 at 23:41 -0400, Guillaume Theoret wrote: > On 6/13/07, Daevid Vincent <[EMAIL PROTECTED]> wrote: > > > > > > > > I actually use this little optimizing trick as an interview question for > > new hires. You'd be amazed at how many people don't think of this, as > > obvious as it s

Re: [PHP] php / mysql performance resources

2007-06-13 Thread Guillaume Theoret
On 6/13/07, Daevid Vincent <[EMAIL PROTECTED]> wrote: I'll throw in my suggestion here as to how I implement this. Generally I evaluate how big are the tables and what do I intend to do with them. Sorting is usually a "problem". Using the PHP multi_sort seems cumbersome and never seems to be as

Re: [PHP] Reformatting the URI on return to the browser

2007-06-13 Thread Robert Cummings
On Thu, 2007-06-14 at 12:17 +0900, Dave M G wrote: > PHP, > > I've implemented "friendly urls" in my PHP scripts, so that people can > type in things like: > http://website.com/Cats And Dogs > ... and they'll be taken to the right page. > > However, when they get to the page, the url will read:

Re: [PHP] php / mysql performance resources

2007-06-13 Thread Guillaume Theoret
On 6/13/07, Richard Lynch <[EMAIL PROTECTED]> wrote: On Wed, June 13, 2007 12:31 pm, Guillaume Theoret wrote: > Thanks for the response. > > On 6/13/07, Robert Cummings <[EMAIL PROTECTED]> wrote: >> On Wed, 2007-06-13 at 10:36 -0400, Guillaume Theoret wrote: >> > Hi everyone, >> > >> > Can anyone

[PHP] Reformatting the URI on return to the browser

2007-06-13 Thread Dave M G
PHP, I've implemented "friendly urls" in my PHP scripts, so that people can type in things like: http://website.com/Cats And Dogs ... and they'll be taken to the right page. However, when they get to the page, the url will read: http://website.com/Cats%20And%20Dogs Not so pretty. I've notice

Re: Re[2]: [PHP] Need a more elegant way of bitwise ORing values

2007-06-13 Thread Robert Cummings
On Thu, 2007-06-14 at 00:33 +0100, Richard Davey wrote: > Hi Richard, > > Wednesday, June 13, 2007, 6:44:55 PM, you wrote: > > >> if ($allow_fraction) > > > //Should we warn you that $allow_fraction is not actually defined?... > > Should I warn you that to save everyone's sanity I only posted w

Re[2]: [PHP] Need a more elegant way of bitwise ORing values

2007-06-13 Thread Richard Davey
Hi Richard, Wednesday, June 13, 2007, 6:44:55 PM, you wrote: >> if ($allow_fraction) > //Should we warn you that $allow_fraction is not actually defined?... Should I warn you that to save everyone's sanity I only posted what was needed from the code? ;) $allow_fraction came from a function para

Re: [PHP] create file permission problem

2007-06-13 Thread tedd
At 1:37 PM -0400 6/13/07, Daniel Brown wrote: On 6/13/07, tedd <[EMAIL PROTECTED]> wrote: Hi Gang: I'm sure this is obvious to most, but not to me. I working on a virtual host. If I want to save data in a file, I can ftpconnect(); change the permissions of an existing file from 0755 to 0777;

Re: [PHP] PHP list as a blog

2007-06-13 Thread Philip Thompson
On Jun 13, 2007, at 1:15 PM, Richard Lynch wrote: On Wed, June 13, 2007 12:21 am, Crayon Shin Chan wrote: On Wednesday 13 June 2007 12:39, Paul Scott wrote: Our interns and students specifically. They are all dead scared of joining mailing lists in general, and find that using a web based pre

RE: [PHP] Calendar

2007-06-13 Thread Daevid Vincent
> -Original Message- > From: Richard Lynch [mailto:[EMAIL PROTECTED] > Sent: Wednesday, June 13, 2007 12:05 PM > > On Wed, June 13, 2007 12:50 pm, Clint Tredway wrote: > > Is there a decent free calendar? I just need to show a few > events on a > > calendar. > > Having looked at a LOT of

RE: [PHP] php / mysql performance resources

2007-06-13 Thread Daevid Vincent
I'll throw in my suggestion here as to how I implement this. Generally I evaluate how big are the tables and what do I intend to do with them. Sorting is usually a "problem". Using the PHP multi_sort seems cumbersome and never seems to be as simple as letting the DB do it. I too use LEFT JOINs

Re: [PHP] Reoccurring task manager

2007-06-13 Thread Richard Heyes
Jason Pruim wrote: > Okay, so I have been searching and trying all day for something so simple... All I want is the ability to pick a task that my business has to do such as Emptying the trash... And do this with it: > > Task: Empty Trash > Description: Empty Trash every monday morning > When

Re: [PHP] GD Library and outputing image

2007-06-13 Thread Daniel Brown
On 6/13/07, Stephen <[EMAIL PROTECTED]> wrote: Ross <[EMAIL PROTECTED]> wrote:Never really used the GD much before very straightforward but how do I output the image on a page. This is fine on a php page on its own but what about one where the headers are already sent? Save the image as

Re: [PHP] GD Library and outputing image

2007-06-13 Thread Stephen
Ross <[EMAIL PROTECTED]> wrote:Never really used the GD much before very straightforward but how do I output the image on a page. This is fine on a php page on its own but what about one where the headers are already sent? Save the image as file, first. The href src= etc

Re: [PHP] GD Library and outputing image

2007-06-13 Thread Daniel Brown
On 6/13/07, Ross <[EMAIL PROTECTED]> wrote: Never really used the GD much before very straightforward but how do I output the image on a page. This is fine on a php page on its own but what about one where the headers are already sent? I take it I can do something like this . Anyone got a bet

[PHP] GD Library and outputing image

2007-06-13 Thread Ross
Never really used the GD much before very straightforward but how do I output the image on a page. This is fine on a php page on its own but what about one where the headers are already sent? I take it I can do something like this . Anyone got a better method? $image = imagecreatefromjpeg

RE: [PHP] PHP list as a blog

2007-06-13 Thread Robert Cummings
On Wed, 2007-06-13 at 14:36 -0500, Richard Lynch wrote: > On Wed, June 13, 2007 2:08 pm, Robert Cummings wrote: > > On Wed, 2007-06-13 at 13:13 -0500, Richard Lynch wrote: > > I strongly disagree with your argument for the use of using require > > logic instead of a redirect. > > > >> PHP responds

Re: [PHP] Reoccurring task manager

2007-06-13 Thread Daniel Brown
[MySQL] L> Table: `tasks` L> Columns: `id` (auto_increment), `task_name`, `completed`, `day_of_week` [PHP] L> File: viewall.php L> File: update.php L> File: cronjob.php [cron] 40 03 * * * /path/to/cronjob.php >> /dev/null 2>&1 NOTE: This was entirely typed directly into

Re: [PHP] PHP list as a blog

2007-06-13 Thread Robert Cummings
On Wed, 2007-06-13 at 20:37 +0100, Stut wrote: > Robert Cummings wrote: > > On Wed, 2007-06-13 at 13:13 -0500, Richard Lynch wrote: > >> PHP responds over dog-slow Internet with 301 Redirect to login.php. > >> Browser interprets 301 Redirect, hopefully correctly. > > > > This is incorrect, PHP sen

Re: [PHP] sending mail from localhost

2007-06-13 Thread Daniel Brown
On 6/13/07, Richard Lynch <[EMAIL PROTECTED]> wrote: Intent inschment. Sorry I didn't get this message sooner, but Gmail's spam filter blocked the message for apparently using "fake filler text" or something. Luckily, however, it didn't interrupt my daily flow of "w4ys 2 rnake rny P3N|$ b1g

[PHP] Reoccurring task manager

2007-06-13 Thread Jason Pruim
Okay, so I have been searching and trying all day for something so simple... All I want is the ability to pick a task that my business has to do such as Emptying the trash... And do this with it: Task: Empty Trash Description: Empty Trash every monday morning When Garbage is empty click check

Re: [PHP] sending mail from localhost

2007-06-13 Thread Richard Lynch
On Wed, June 13, 2007 2:07 pm, Daniel Brown wrote: > As for the SPAM filter stuff, all of the rest makes sense, but the > Reply-to: header actually goes against the original spirit and > intention of the design. Refer to RFC 822 Part 4 Section 1 --- the > reply-to header is intended for use as

Re: [PHP] PHP list as a blog

2007-06-13 Thread Daniel Brown
On 6/13/07, Richard Lynch <[EMAIL PROTECTED]> wrote: On Wed, June 13, 2007 12:20 am, Paul Scott wrote: > > On Tue, 2007-06-12 at 16:02 -0500, Richard Lynch wrote: >> > OK, downed it. Will figure out a regular expression to strip out >> the >> > email addresses when I have had some coffee in th

Re: [PHP] PHP list as a blog

2007-06-13 Thread Stut
Robert Cummings wrote: On Wed, 2007-06-13 at 13:13 -0500, Richard Lynch wrote: PHP responds over dog-slow Internet with 301 Redirect to login.php. Browser interprets 301 Redirect, hopefully correctly. This is incorrect, PHP sends a 302 status code. From the online docs: "The second specia

RE: [PHP] PHP list as a blog

2007-06-13 Thread Richard Lynch
On Wed, June 13, 2007 2:08 pm, Robert Cummings wrote: > On Wed, 2007-06-13 at 13:13 -0500, Richard Lynch wrote: > I strongly disagree with your argument for the use of using require > logic instead of a redirect. > >> PHP responds over dog-slow Internet with 301 Redirect to login.php. >> Browser in

Re: [PHP] create file permission problem

2007-06-13 Thread Daniel Brown
On Wed, June 13, 2007 12:13 pm, tedd wrote: > If I want to save data in a file, I can ftpconnect(); change the > permissions of an existing file from 0755 to 0777; write to the file; > and change the permissions of the file back to 0755 -- no problem. On 6/13/07, Richard Lynch <[EMAIL PROTECTED]

Re: [PHP] PHP list as a blog

2007-06-13 Thread Robert Cummings
On Wed, 2007-06-13 at 15:11 -0400, Daniel Brown wrote: > On 6/13/07, Richard Lynch <[EMAIL PROTECTED]> wrote: > > > Oh, we'll fill that sucker up pretty fast... :-) > > Yeah, more or less with our off-topic useless Wednesday banter > alone. I don't think I'd ever read this list if I had to g

Re: [PHP] IF with multiple values for a variable

2007-06-13 Thread Stut
Dan Shirah wrote: if ($type == 'T','D','L' { $get_id.=" payment_request WHERE id = '$payment_id'"; } if (in_array($type, array('T', 'D', 'L'))) { ... } -Stut -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] PHP list as a blog

2007-06-13 Thread Richard Lynch
On Wed, June 13, 2007 5:11 am, Paul Scott wrote: > > On Wed, 2007-06-13 at 12:08 +0200, Zoltán Németh wrote: >> is this the link: >> http://196.21.45.50/fsiu/chisimba_framework/app/index.php?module=blog&action=allblogs >> ? >> (this was in your original post) >> > > No, sorry, I have just updat

RE: [PHP] PHP list as a blog

2007-06-13 Thread Richard Lynch
On Wed, June 13, 2007 12:20 am, Paul Scott wrote: > > On Tue, 2007-06-12 at 16:02 -0500, Richard Lynch wrote: >> > OK, downed it. Will figure out a regular expression to strip out >> the >> > email addresses when I have had some coffee in the morning > > I have added a regex to strip out the mai

Re: [PHP] Address validation API's for PHP

2007-06-13 Thread Richard Lynch
On Wed, June 13, 2007 10:19 am, Robert Cummings wrote: > On Wed, 2007-06-13 at 17:16 +0200, Zoltán Németh wrote: >> 2007. 06. 13, szerda keltezéssel 10.52-kor Daniel Brown ezt írta: >> > On 6/13/07, Jason Pruim <[EMAIL PROTECTED]> wrote: >> > >> > Jason: Tell them to stop raising the price of

Re: [PHP] PHP list as a blog

2007-06-13 Thread Paul Scott
On Wed, 2007-06-13 at 13:15 -0500, Richard Lynch wrote: > Do students and interns still have quotas on their email accounts?... > Students get 100MB, interns and staff too. That is storage space on the IMAP server though, if you POP it off (like I do) you can get over 1GB of mail a month (like I

Re: [PHP] create file permission problem

2007-06-13 Thread Richard Lynch
On Wed, June 13, 2007 12:13 pm, tedd wrote: > I'm sure this is obvious to most, but not to me. > > I working on a virtual host. > > If I want to save data in a file, I can ftpconnect(); change the > permissions of an existing file from 0755 to 0777; write to the file; > and change the permissions o

Re: [PHP] php / mysql performance resources

2007-06-13 Thread Richard Lynch
On Wed, June 13, 2007 12:31 pm, Guillaume Theoret wrote: > Thanks for the response. > > On 6/13/07, Robert Cummings <[EMAIL PROTECTED]> wrote: >> On Wed, 2007-06-13 at 10:36 -0400, Guillaume Theoret wrote: >> > Hi everyone, >> > >> > Can anyone recommend any good books/resources for php and mysql >

Re: [PHP] PHP list as a blog

2007-06-13 Thread Daniel Brown
On 6/13/07, Richard Lynch <[EMAIL PROTECTED]> wrote: Oh, we'll fill that sucker up pretty fast... :-) Yeah, more or less with our off-topic useless Wednesday banter alone. I don't think I'd ever read this list if I had to get it in digest form, but a searchable blog maybe, if I'm looki

Re: [PHP] PHP list as a blog

2007-06-13 Thread Paul Scott
On Wed, 2007-06-13 at 13:16 -0500, Richard Lynch wrote: > Oh, we'll fill that sucker up pretty fast... :-) > Thats what I am counting on! I have been on this list a while, and a couple flamewars should do the trick :) --Paul All Email originating from UWC is covered by disclaimer http://www.u

RE: [PHP] PHP list as a blog

2007-06-13 Thread Paul Scott
On Wed, 2007-06-13 at 13:13 -0500, Richard Lynch wrote: > I am currently averaging 2 posts per year, roughly, including today's > rant about header("Location:"): I was asked to write a blog, I am no blogger myself, thought it was a cool challenge to make a good one, so I took it on. Personally,

Re: [PHP] IF with multiple values for a variable

2007-06-13 Thread Richard Lynch
On Wed, June 13, 2007 12:35 pm, Dan Shirah wrote: > Okay, I know this has got to be easy but it's not working any way I > try it. > > When a record is selected it opens up a new page. My query will > display the > specific results based on the type of record selected. There can be > multiple va

RE: [PHP] PHP list as a blog

2007-06-13 Thread Robert Cummings
On Wed, 2007-06-13 at 13:13 -0500, Richard Lynch wrote: > > I am currently averaging 2 posts per year, roughly, including today's > rant about header("Location:"): > > http://richardlynchblogspot.com I strongly disagree with your argument for the use of using require logic instead of a redirect.

Re: [PHP] sending mail from localhost

2007-06-13 Thread Daniel Brown
On 6/13/07, Richard Lynch <[EMAIL PROTECTED]> wrote: On Wed, June 13, 2007 1:09 pm, Daniel Brown wrote: > Is that a fact, Richard? It was always my understanding that the > raw connection to the SMTP server initiated by the PHP mail() > functions and Sendmail required the \r\n separator for

Re: [PHP] Calendar

2007-06-13 Thread Richard Lynch
On Wed, June 13, 2007 12:50 pm, Clint Tredway wrote: > Is there a decent free calendar? I just need to show a few events on a > calendar. Having looked at a LOT of web calendars (for touring musicians) I can say with certainty that if you only have a FEW events, a month-like layout with boxes for

Re: [PHP] sending mail from localhost

2007-06-13 Thread Richard Lynch
On Wed, June 13, 2007 1:09 pm, Daniel Brown wrote: > Is that a fact, Richard? It was always my understanding that the > raw connection to the SMTP server initiated by the PHP mail() > functions and Sendmail required the \r\n separator for every field > other than SUBJECT (included in the DATA

RE: [PHP] Looking for help with forms/variables and an array!

2007-06-13 Thread Richard Lynch
On Tue, June 12, 2007 6:37 pm, BSumrall wrote: > Is there much support for it? Support for what? > I didn't seem to find much support on ajax. Ajax has a few zillion uesrs/zealots/developers. I dunno how you missed them all, but they are out there. And Ajax doesn't really care if your XML resp

Re: [PHP] Going from simple to super CAPTCHA

2007-06-13 Thread Richard Lynch
On Wed, June 13, 2007 3:36 am, Robin Vickery wrote: > On 12/06/07, Richard Lynch <[EMAIL PROTECTED]> wrote: >> On Tue, June 12, 2007 9:33 am, Tijnema wrote: >> > I meant reverse order :P >> >> That would be pretty broken. >> >> There's no guarantee that browsers will present the inputs in any >> or

RE: [PHP] Going from simple to super CAPTCHA

2007-06-13 Thread Richard Lynch
On Tue, June 12, 2007 10:12 pm, Jake McHenry wrote: > Has anyone tried cracking/hacking what Microsoft has done with the > animal > pictures? MS is using petfinder.com or whatever it is, as their source to know what is a "cat" and a "dog" So all you have to do is trick petfinder.com into giving y

RE: [PHP] Calendar

2007-06-13 Thread Jim Moseby
> > I did that and either they are not free or suck... dont appreciate the comment > > > On 6/13/07, Jim Moseby <[EMAIL PROTECTED]> wrote: > > > > > > Is there a decent free calendar? I just need to show a few events on a > > > calendar. > > > > You could try your bank. They usually have free cal

Re: [PHP] IF with multiple values for a variable

2007-06-13 Thread Robert Cummings
On Wed, 2007-06-13 at 13:57 -0400, [EMAIL PROTECTED] wrote: > double pipes constitutes an "OR" operation. You can use the keyword OR as > well. Also, && and AND are the same as well. > > http://us.php.net/manual/en/language.operators.logical.php They aren't exactly the same. Make sure and re

Re: [PHP] PHP list as a blog

2007-06-13 Thread Richard Lynch
On Wed, June 13, 2007 12:29 am, Paul Scott wrote: > This was done as well to give my blog code a bit of a test drive as > well, I had no idea how it would perform with lots of posts too, so I > will also be able to optimize queries etc as the posts fill up. Oh, we'll fill that sucker up pretty fas

Re: [PHP] PHP list as a blog

2007-06-13 Thread Richard Lynch
On Wed, June 13, 2007 12:21 am, Crayon Shin Chan wrote: > On Wednesday 13 June 2007 12:39, Paul Scott wrote: > >> Our interns and students specifically. They are all dead scared of >> joining mailing lists in general, and find that using a web based >> prettier interface is much easier and friendli

RE: [PHP] PHP list as a blog

2007-06-13 Thread Richard Lynch
On Tue, June 12, 2007 11:39 pm, Paul Scott wrote: > BTW, could I get your opinions on the blog software itself? This is > running a CVS checkout of the Chisimba framework with the blog module > installed. It's a blog. People type things. They show up, more or less in some kind of order. ... I

Re: [PHP] Address validation API's for PHP

2007-06-13 Thread Daniel Brown
On 6/13/07, Richard Lynch <[EMAIL PROTECTED]> wrote: On Wed, June 13, 2007 10:07 am, Jochem Maas wrote: > I thought beer was free ;-P > > joke aside I never did get the 'free as in beer' argument, has nobody > in > the FOSS movement ever heard of a brewery cartel? http://en.wikipedia.org/wiki/Fr

RE: [PHP] Calendar

2007-06-13 Thread Jim Moseby
> > Is there a decent free calendar? I just need to show a few events on a > calendar. You could try your bank. They usually have free calendars, coffee mugs, pencils, etc. ;-) Seriously though, type 'php calendar' into google and see what happens. -- PHP General Mailing List (http://www.php

Re: [PHP] sending mail from localhost

2007-06-13 Thread Daniel Brown
On 6/13/07, Richard Lynch <[EMAIL PROTECTED]> wrote: On Wed, June 13, 2007 8:51 am, Daniel Brown wrote: > $from = "[EMAIL PROTECTED]"; > //$reply_to = "[EMAIL PROTECTED]"; // Same address, so not needed. Some spam filters and some email clients will behave rather badly if you don't have Reply-to

Re: [PHP] Address validation API's for PHP

2007-06-13 Thread Richard Lynch
On Wed, June 13, 2007 10:07 am, Jochem Maas wrote: > I thought beer was free ;-P > > joke aside I never did get the 'free as in beer' argument, has nobody > in > the FOSS movement ever heard of a brewery cartel? http://en.wikipedia.org/wiki/Free_as_in_beer I get all my beer for free. Well, not r

[PHP] Re: create file permission problem

2007-06-13 Thread Al
Doesn't ftp_chmod() work immediately after creating your file, while the resource is still open? Check the permissions for the directory. Check the file and dir permissions with your ftp utility [e.g., WinSCP]. Or, write a simple script that echoes them. It really should work, I do it frequ

Re: [PHP] Address validation API's for PHP

2007-06-13 Thread Richard Lynch
On Wed, June 13, 2007 9:52 am, Daniel Brown wrote: > Jason: Tell them to stop raising the price of the damned stamps! > Offer to take a pay cut and take one for the team I'll buy you a > beer. Or, better yet, raise it as high as they want, but STOP DELIVERING THE JUNK MAIL so you can actu

Re: [PHP] Address validation API's for PHP

2007-06-13 Thread Richard Lynch
On Wed, June 13, 2007 9:13 am, Daniel Brown wrote: > Jay, are you also looking for the PLUS+4 ZIP code information? Is it > possible that the USPS (if you're looking for US addresses) has a free > or low-cost API? Last I checked, USPS was anything but low-cost. Plus, they only work for US, afaik

Re: [PHP] sending mail from localhost

2007-06-13 Thread Richard Lynch
On Wed, June 13, 2007 8:51 am, Daniel Brown wrote: > $from = "[EMAIL PROTECTED]"; > //$reply_to = "[EMAIL PROTECTED]"; // Same address, so not needed. Some spam filters and some email clients will behave rather badly if you don't have Reply-to: as well. Use it. > $headers .= "X-Mailer: PHP".phpv

Re: [PHP] IF with multiple values for a variable

2007-06-13 Thread tg-php
double pipes constitutes an "OR" operation. You can use the keyword OR as well. Also, && and AND are the same as well. http://us.php.net/manual/en/language.operators.logical.php -TG = = = Original message = = = Excellent! Double pipes to seperate possible multiple variable values. Thank

Re: [PHP] php / mysql performance resources

2007-06-13 Thread Robert Cummings
On Wed, 2007-06-13 at 12:39 -0500, Richard Lynch wrote: > On Wed, June 13, 2007 10:17 am, Robert Cummings wrote: > > On Wed, 2007-06-13 at 10:36 -0400, Guillaume Theoret wrote: > >> Hi everyone, > >> > >> Can anyone recommend any good books/resources for php and mysql > >> performance management? I

Re: [PHP] Address validation API's for PHP

2007-06-13 Thread Richard Lynch
On Wed, June 13, 2007 7:45 am, Jay Blanchard wrote: > I am doing some searching and researching but I also know that this > world famous group may have some insight and resources that I can > benefit from. > > I am looking for an address validation database and API to use with > our > retail applic

Re: [PHP] IF with multiple values for a variable

2007-06-13 Thread tg-php
Could try something like this: $types = array('T', 'D', 'L'); if (in_array($type, $types)) { // do something } But that's going to just check to see if $type is one of the valid types you're looking for. You might try something like switch. switch ($type) { case 'T': // Output 'T' rec

[PHP] Calendar

2007-06-13 Thread Clint Tredway
Is there a decent free calendar? I just need to show a few events on a calendar. -- I am not a diabetic, I have diabetes my blog - http://grumpee.instantspot.com/blog -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Need a more elegant way of bitwise ORing values

2007-06-13 Thread Richard Lynch
On Wed, June 13, 2007 8:13 am, Richard Davey wrote: > Hi all, > > Can anyone think of a more elegant way of achieving the following? > > $flags = array(); $flags = 0; > > if ($allow_fraction) //Should we warn you that $allow_fraction is not actually defined?... //You don't have register_globals

Re: [PHP] php / mysql performance resources

2007-06-13 Thread Robert Cummings
On Wed, 2007-06-13 at 13:31 -0400, Guillaume Theoret wrote: > Thanks for the response. > > On 6/13/07, Robert Cummings <[EMAIL PROTECTED]> wrote: > > On Wed, 2007-06-13 at 10:36 -0400, Guillaume Theoret wrote: > > > Hi everyone, > > > > > > Can anyone recommend any good books/resources for php and

Re: [PHP] create file permission problem

2007-06-13 Thread Robert Cummings
On Wed, 2007-06-13 at 13:13 -0400, tedd wrote: > Hi Gang: > > I'm sure this is obvious to most, but not to me. > > I working on a virtual host. > > If I want to save data in a file, I can ftpconnect(); change the > permissions of an existing file from 0755 to 0777; write to the file; > and cha

Re: [PHP] IF with multiple values for a variable

2007-06-13 Thread Dan Shirah
Excellent! Double pipes to seperate possible multiple variable values. Thanks Daniel! On 6/13/07, Daniel Brown <[EMAIL PROTECTED]> wrote: On 6/13/07, Dan Shirah <[EMAIL PROTECTED]> wrote: > Okay, I know this has got to be easy but it's not working any way I try it. > > When a record is sele

Re: [PHP] Persistent MySQL Connection

2007-06-13 Thread Richard Lynch
On Wed, June 13, 2007 8:53 am, PHP Mailing List wrote: > I currently running my php as cgi as it is more controllable in shared > hosting, the drawback is I cannot use mysql persistent connection so > mysql_pconnect() function is not an option. Is there any mysql > connection pool product for php r

Re: [PHP] IF with multiple values for a variable

2007-06-13 Thread Daniel Brown
On 6/13/07, Dan Shirah <[EMAIL PROTECTED]> wrote: Okay, I know this has got to be easy but it's not working any way I try it. When a record is selected it opens up a new page. My query will display the specific results based on the type of record selected. There can be multiple values in each

Re: [PHP] php / mysql performance resources

2007-06-13 Thread Richard Lynch
On Wed, June 13, 2007 10:17 am, Robert Cummings wrote: > On Wed, 2007-06-13 at 10:36 -0400, Guillaume Theoret wrote: >> Hi everyone, >> >> Can anyone recommend any good books/resources for php and mysql >> performance management? I'm more interested in the software >> development side (as opposed t

Re: [PHP] create file permission problem

2007-06-13 Thread Daniel Brown
On 6/13/07, tedd <[EMAIL PROTECTED]> wrote: Hi Gang: I'm sure this is obvious to most, but not to me. I working on a virtual host. If I want to save data in a file, I can ftpconnect(); change the permissions of an existing file from 0755 to 0777; write to the file; and change the permissions o

RE: Re[6]: [PHP] Need a more elegant way of bitwise ORing values

2007-06-13 Thread Ford, Mike
> From: Richard Davey [mailto:[EMAIL PROTECTED] > Sent: Wed 13/06/2007 15:19 > To: PHP List > > > Hi Robert, > > Wednesday, June 13, 2007, 3:15:39 PM, you wrote: > > > It's terribly verbose and inefficient... > > > > > $filter['flags'] = 0; > > > if( $allow_

[PHP] IF with multiple values for a variable

2007-06-13 Thread Dan Shirah
Okay, I know this has got to be easy but it's not working any way I try it. When a record is selected it opens up a new page. My query will display the specific results based on the type of record selected. There can be multiple values in each if. However I am having a brain fart in my if stat

Re: [PHP] php / mysql performance resources

2007-06-13 Thread Guillaume Theoret
Thanks for the response. On 6/13/07, Robert Cummings <[EMAIL PROTECTED]> wrote: On Wed, 2007-06-13 at 10:36 -0400, Guillaume Theoret wrote: > Hi everyone, > > Can anyone recommend any good books/resources for php and mysql > performance management? I'm more interested in the software > developme

Re: [PHP] Is this code thread safe?

2007-06-13 Thread Richard Lynch
On Wed, June 13, 2007 10:52 am, Christian Cantrell wrote: > I'm pretty sure this code is thread safe, but I just want to be 100% > sure. > I have a class called ViewHelper with a static function called > is_signed_in. > All it does is check the session for the existence of a particular > variable,

[PHP] create file permission problem

2007-06-13 Thread tedd
Hi Gang: I'm sure this is obvious to most, but not to me. I working on a virtual host. If I want to save data in a file, I can ftpconnect(); change the permissions of an existing file from 0755 to 0777; write to the file; and change the permissions of the file back to 0755 -- no problem. Ho

[PHP] Dom appendChild strips trailing text from within a node

2007-06-13 Thread Eric Wiener
I am trying to modify a node name and it mostly works, except that appendChild seems to strip the text that FOLLOWS after a subnode. Leading text and subnodes appear to be retained perfectly, just not text trailing the subnode. I tried using cloneNode, but that discarded the children even when I se

Re: [PHP] Redirecting to a parent page

2007-06-13 Thread Richard Lynch
On Wed, June 13, 2007 11:12 pm, Yamil Ortega wrote: > Lets say that I have the next structure on my web directory > > /file1.php > > /procces/file2.php > > /file3.php > > So, when I see the file1.php on the browser I see the page in this > route > > http://localhost/apache2/file1.php > > I have a

Re: [PHP] Address validation API's for PHP

2007-06-13 Thread Robert Cummings
On Wed, 2007-06-13 at 11:58 -0400, Daniel Brown wrote: > > Oh, and Zoltán and Robert --- just wanted you guys to know that I > hate you both. > > I miss the days of working from home, too Drown your sorrows in beer... oh wait!! *teehee* ;) Cheers, Rob. -- .-

Re: [PHP] Is this code thread safe?

2007-06-13 Thread Daniel Brown
On 6/13/07, Christian Cantrell <[EMAIL PROTECTED]> wrote: I'm pretty sure this code is thread safe, but I just want to be 100% sure. I have a class called ViewHelper with a static function called is_signed_in. All it does is check the session for the existence of a particular variable, and if it

Re: [PHP] Address validation API's for PHP

2007-06-13 Thread Daniel Brown
On 6/13/07, Daniel Brown <[EMAIL PROTECTED]> wrote: On 6/13/07, Jason Pruim <[EMAIL PROTECTED]> wrote: > > On Jun 13, 2007, at 11:10 AM, Daniel Brown wrote: > > > On 6/13/07, Jason Pruim <[EMAIL PROTECTED]> wrote: > >> > >> On Jun 13, 2007, at 10:52 AM, Daniel Brown wrote: > >> > >> >> > >> >> Hi

Re: [PHP] Address validation API's for PHP

2007-06-13 Thread Daniel Brown
On 6/13/07, Jason Pruim <[EMAIL PROTECTED]> wrote: On Jun 13, 2007, at 11:10 AM, Daniel Brown wrote: > On 6/13/07, Jason Pruim <[EMAIL PROTECTED]> wrote: >> >> On Jun 13, 2007, at 10:52 AM, Daniel Brown wrote: >> >> >> >> >> Hi Jay, >> >> >> >> I actually work with the post office on my day job

[PHP] Is this code thread safe?

2007-06-13 Thread Christian Cantrell
I'm pretty sure this code is thread safe, but I just want to be 100% sure. I have a class called ViewHelper with a static function called is_signed_in. All it does is check the session for the existence of a particular variable, and if it's there, it returns true, otherwise false. Since the funct

Re: [PHP] Address validation API's for PHP

2007-06-13 Thread Jason Pruim
On Jun 13, 2007, at 11:10 AM, Daniel Brown wrote: On 6/13/07, Jason Pruim <[EMAIL PROTECTED]> wrote: On Jun 13, 2007, at 10:52 AM, Daniel Brown wrote: >> >> Hi Jay, >> >> I actually work with the post office on my day job, we do presorted >> mailings with them. And I can tell you that the

Re: [PHP] Address validation API's for PHP

2007-06-13 Thread Robert Cummings
On Wed, 2007-06-13 at 17:16 +0200, Zoltán Németh wrote: > 2007. 06. 13, szerda keltezéssel 10.52-kor Daniel Brown ezt írta: > > On 6/13/07, Jason Pruim <[EMAIL PROTECTED]> wrote: > > > > Jason: Tell them to stop raising the price of the damned stamps! > > Offer to take a pay cut and take one

Re: [PHP] php / mysql performance resources

2007-06-13 Thread Robert Cummings
On Wed, 2007-06-13 at 10:36 -0400, Guillaume Theoret wrote: > Hi everyone, > > Can anyone recommend any good books/resources for php and mysql > performance management? I'm more interested in the software > development side (as opposed to server configuration) of things. I'm > looking for anything

Re: [PHP] Address validation API's for PHP

2007-06-13 Thread Zoltán Németh
2007. 06. 13, szerda keltezéssel 10.52-kor Daniel Brown ezt írta: > On 6/13/07, Jason Pruim <[EMAIL PROTECTED]> wrote: > > > > On Jun 13, 2007, at 10:19 AM, Jay Blanchard wrote: > > > > > [snip] > > > Someone needs to smack Robert. He's off on a tangent again. ;-P > > > [/snip] > > > > > > No

[PHP] Google Talk Integration

2007-06-13 Thread Not�cias PHP
Hi, In the site http://www.imified.com/api/ it has a API that it makes the integration of the GTALK with any programming language. But I am not obtaining to make script php to send a message for my user in google talk. Somebody already used this api? Hermes Alves www.argohost.net -- PHP Gen

Re: Re[8]: [PHP] Need a more elegant way of bitwise ORing values

2007-06-13 Thread Robert Cummings
On Wed, 2007-06-13 at 15:59 +0100, Richard Davey wrote: > Hi Robert, > > Wednesday, June 13, 2007, 3:37:38 PM, you wrote: > > > Personally I hate constants (can't use non-scalar values so why get used > > ot them... also they're just another point for name collision) so if it > > were my own code

Re: [PHP] Address validation API's for PHP

2007-06-13 Thread Daniel Brown
On 6/13/07, Jason Pruim <[EMAIL PROTECTED]> wrote: On Jun 13, 2007, at 10:52 AM, Daniel Brown wrote: >> >> Hi Jay, >> >> I actually work with the post office on my day job, we do presorted >> mailings with them. And I can tell you that the post office does not >> sell any addresses to private i

Re: [PHP] Address validation API's for PHP

2007-06-13 Thread Jochem Maas
Daniel Brown wrote: > On 6/13/07, Jason Pruim <[EMAIL PROTECTED]> wrote: >> ... >> >> > >Jason: Tell them to stop raising the price of the damned stamps! > Offer to take a pay cut and take one for the team I'll buy you a > beer. > >Zoltán: Trade with me. I've been here for less t

Re: [PHP] Address validation API's for PHP

2007-06-13 Thread Jason Pruim
On Jun 13, 2007, at 10:52 AM, Daniel Brown wrote: Hi Jay, I actually work with the post office on my day job, we do presorted mailings with them. And I can tell you that the post office does not sell any addresses to private individuals. For the mailings we do where we need to get a list we h

Re: [PHP] Address validation API's for PHP

2007-06-13 Thread Robert Cummings
On Wed, 2007-06-13 at 10:52 -0400, Daniel Brown wrote: > On 6/13/07, Jason Pruim <[EMAIL PROTECTED]> wrote: > > On Jun 13, 2007, at 10:19 AM, Jay Blanchard wrote: > > > > Hi Jay, > > > > I actually work with the post office on my day job, we do presorted > > mailings with them. And I can tell you t

Re: [PHP] Address validation API's for PHP

2007-06-13 Thread Jason Pruim
On Jun 13, 2007, at 10:19 AM, Jay Blanchard wrote: [snip] Someone needs to smack Robert. He's off on a tangent again. ;-P [/snip] Nope, that is normal. [snip] Honestly, me either. I've built ZIP-code-to-longitude/latitude points, but nothing with address suggestion. Jay, are you also

RE: [PHP] Address validation API's for PHP

2007-06-13 Thread Zoltán Németh
2007. 06. 13, szerda keltezéssel 10.24-kor Robert Cummings ezt írta: > On Wed, 2007-06-13 at 09:19 -0500, Jay Blanchard wrote: > > [snip] > > Someone needs to smack Robert. He's off on a tangent again. ;-P > > [/snip] > > > > Nope, that is normal. > > Just adding some light morning humour t

Re: Re[6]: [PHP] Need a more elegant way of bitwise ORing values

2007-06-13 Thread Robert Cummings
On Wed, 2007-06-13 at 15:19 +0100, Richard Davey wrote: > Hi Robert, > > Wednesday, June 13, 2007, 3:15:39 PM, you wrote: > > > It's terribly verbose and inefficient... > > > > > $filter['flags'] = 0; > > > if( $allow_fraction ) > > { > > $filter['flags'] |= FILTER_FLAG_ALLOW_FRACTION; >

[PHP] php / mysql performance resources

2007-06-13 Thread Guillaume Theoret
Hi everyone, Can anyone recommend any good books/resources for php and mysql performance management? I'm more interested in the software development side (as opposed to server configuration) of things. I'm looking for anything that would be good to know when working on websites that get millions

  1   2   >