Re: [PHP] Javascript detection

2011-04-28 Thread Geoff Lane
On Thursday, April 28, 2011, tedd wrote: > To answer your question in a new thread. > No, the $_SERVER super-global isn't going to give you anything nor is > anything else like it. > You see, PHP has a difficult time detecting IF Javascript is turned > ON in the client's browser because PHP

Re: [PHP] Destroying cookies... not working

2011-04-28 Thread Geoff Lane
On Thursday, April 28, 2011, Sean Greenslade wrote: > On Wed, Apr 27, 2011 at 8:52 PM, Rick Dwyer > wrote: >> The following did the trick... is there any reason I should not use it? >> >> $name="mysession"; >> setcookie($name); >> >> --Rick > Only if you're OCD, since the cookie is still tech

Re: [PHP] Javascript detection

2011-04-28 Thread Per Jessen
tedd wrote: > As Yogi Berra once said; "It's always hard to predict things > especially when it deals with the future." > He was quoting Niels Bohr: http://www.quotationspage.com/quote/26159.html -- Per Jessen, Zürich (10.2°C) -- PHP General Mailing List (http://www.php.net/) To unsubscri

[PHP] Nested XInclude in XML

2011-04-28 Thread nimruhil
I need to insert a content of an XML node into text of another XML element in the same document. I use XInclude for this purpose. For example: http://www.w3.org/2001/XInclude";> Lorem ipsum sed do eiusmod tempor d

RE: [PHP] Detecting Javascript (was Re: Newsgroup status)

2011-04-28 Thread Jay Blanchard
[snip] this isn't possible [/snip] Welcome to the world of progressive enhancement! http://www.alistapart.com/articles/understandingprogressiveenhancement/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Flattery will get you nowhere

2011-04-28 Thread Marc Guay
> What are you are looking for? I'm working on a new form and after reading a few threads on this list since I've subscribed I realized that validating input is a weakness of mine. I figured you would have an example online somewhere covered some of the main security concerns. Marc -- PHP Gene

Re: [PHP] refreshing pages in the cache

2011-04-28 Thread Jim Giner
Yes - that seems to be the trick! Thank you very much for your tip AND your patience. :) You've made an old programmer's day! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Flattery will get you nowhere

2011-04-28 Thread tedd
At 9:11 AM -0400 4/28/11, Marc Guay wrote: > What are you are looking for? I'm working on a new form and after reading a few threads on this list since I've subscribed I realized that validating input is a weakness of mine. I figured you would have an example online somewhere covered some of t

RE: [PHP] refreshing pages in the cache

2011-04-28 Thread Ross Hansen
Your welcome, I am glad that it works and is doing what your after. > To: php-general@lists.php.net > From: jim.gi...@albanyhandball.com > Date: Thu, 28 Apr 2011 09:19:58 -0400 > Subject: Re: [PHP] refreshing pages in the cache > > Yes - that seems to be t

Re: [PHP] Javascript detection

2011-04-28 Thread tedd
At 9:02 AM +0100 4/28/11, Geoff Lane wrote: FWIW, it's possible to detect whether or not Javascript is available, but not AFAICT at 'first contact' because you need the 'first contact' page to do something to prove that JS is available, from which you can assume that JS is not should that someth

[PHP] Re: How to write a PHP coding to list out all files and directories aslinks to them?

2011-04-28 Thread Mitch
On 4/14/2011 6:16 PM, Mikhail S wrote: How to write a PHP coding to list out all files and directories as links to them? This is somewhat similar to some index pages. When new file or folder is added to the directory, HTML page should display the newly created file/folder together with previous

Re: [PHP] Javascript detection

2011-04-28 Thread Ashley Sheridan
On Thu, 2011-04-28 at 10:17 -0400, tedd wrote: > At 9:02 AM +0100 4/28/11, Geoff Lane wrote: > > > >FWIW, it's possible to detect whether or not Javascript is available, > >but not AFAICT at 'first contact' because you need the 'first contact' > >page to do something to prove that JS is available,

Re: [PHP] Flattery will get you nowhere

2011-04-28 Thread Nathan Rixham
tedd wrote: At 4:58 PM -0400 4/27/11, Robert Cummings wrote: Tedd who? ;) Cheers, Rob. Rob what? ;-) Cheers, tedd flirting? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] What's faster using if else or arrays?

2011-04-28 Thread dholmes1031
I'm working on a project and I was wondering if I should use if else's or arrays ?? Example If($foo= 5) { $dothis } ElseIf($foo= 3) { $dothis } Else{ $donothing } Or put it in some short of arrays and pregmatch what would be the best to use and easiest to read Sent via BlackBerry from T-M

[PHP] Re: What's faster using if else or arrays?

2011-04-28 Thread Jim Giner
how many entries are you talking about, ie., how many conditions? Obviously if you have more than 4-5 it's going to be easier to code up as a case statement (?) rather than an if/else. Never in all my days have I ever heard of using an array for such a determination though. (remainder deleted

Re: [PHP] Javascript detection

2011-04-28 Thread Geoff Lane
On Thursday, April 28, 2011, Ashley Sheridan wrote: > I'm not sure if my earlier reply got through, but here it is again (or > at least the general gist of it) Many thanks. I got your info the first time around but didn't respond directly to you as Tedd made similar comments and I'd responded to

Re: [PHP] What's faster using if else or arrays?

2011-04-28 Thread Andre Polykanine
Hello Dholmes1031, I would write it like this: switch($foo) { case 5: $dothis; break; case 3: $dothat; break; default: $donothing; break; } -- With best regards from Ukraine, Andre Skype: Francophile My blog: http://oire.org/menelion (mostly in Russian) Twitter: http://twitter.com/m_

Re: [PHP] Re: What's faster using if else or arrays?

2011-04-28 Thread Andre Polykanine
Hello Jim, I heard of arrays in the following context: if (($foo==5) || ($foo=="orange") || ($foo==88) .. So *that* would be done much better and cleaner with arrays. $FoosArray=array(5, "orange", 88); if (in_array($foo, $FoosArray)) { ... } -- With best regards from Ukraine, Andre Skype: Fr

Re: [PHP] What's faster using if else or arrays?

2011-04-28 Thread dholmes1031
Thanks switch and case seems to be more faster for the job and a lot cleaner --Original Message-- From: Andre Polykanine To: dholmes1...@gmail.com Cc: php-general@lists.php.net Subject: Re: [PHP] What's faster using if else or arrays? Sent: Apr 28, 2011 6:17 PM Hello Dholmes1031, I would

Re: [PHP] Re: What's faster using if else or arrays?

2011-04-28 Thread Jim Giner
Arrays - using a silly construct that probably still takes as much time to evaluate machine-wise as anything else. And as far as readability goes, it is even sillier. IMO. (remainder deleted for readers' sakes :) ) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] Flattery will get you nowhere

2011-04-28 Thread Robert Cummings
On 11-04-28 05:23 PM, Nathan Rixham wrote: tedd wrote: At 4:58 PM -0400 4/27/11, Robert Cummings wrote: Tedd who? ;) Cheers, Rob. Rob what? ;-) Cheers, tedd flirting? Flirting will get you everywhere *bats eyelids* -- E-Mail Disclaimer: Information contained in this message and any

Re: [PHP] What's faster using if else or arrays?

2011-04-28 Thread Robert Cummings
On 11-04-28 06:37 PM, dholmes1...@gmail.com wrote: Thanks switch and case seems to be more faster for the job and a lot cleaner --Original Message-- From: Andre Polykanine To: dholmes1...@gmail.com Cc: php-general@lists.php.net Subject: Re: [PHP] What's faster using if else or arrays? Sen

Re: [PHP] Re: What's faster using if else or arrays?

2011-04-28 Thread Geoff Lane
On Thursday, April 28, 2011, Jim Giner wrote: > Arrays - using a silly construct that probably still takes as much > time to evaluate machine-wise as anything else. And as far as > readability goes, it is even sillier. IMO. I don't know so much about that ... I'll use a global array to def

Re: [PHP] Re: What's faster using if else or arrays?

2011-04-28 Thread Jim Giner
Obviously you have designed a search/decision mechanism that suits your needs. The OP did not present a problem of such magnitude. He only asked how to handle a decision process the most efficient way - with no mention of higher goals such as yours. didn't mean to offend anyone who has made a

[PHP] gd Graphics Library Question (EXIF)

2011-04-28 Thread Mitch
I have written a lightweight, easy to use photo album "system" in HTML/PHP/MySQL.In addition to the Photo Album side I have written a series of Admin Utilities to manage it with. One of the administrative utilities uploads photos from my local drive, resizes them to be more efficient on disk sp

[PHP] PHP delete confirmation

2011-04-28 Thread Chris Stinemetz
I have been trying to figure out how to add delete confirmation for the bellow snippet of code. I would prefer not to use javascript. Can anyone offer any advise on how to right the delete confirmation in PHP? Thank you in advance. P.S. I apologize for the indention. For some reason gmail messes

RE: [PHP] PHP delete confirmation

2011-04-28 Thread admin
This can be done in the delete.php file OR use javascript onClick to confirm the intent. Delete.php Personally I would use the javascript page navigation is senseless if they miss click. Javascript: Small and simple javascript. onclick="return confirm('Are you sure you want to delete?')"

Re: [PHP] Re: What's faster using if else or arrays?

2011-04-28 Thread Ashley Sheridan
On Thu, 2011-04-28 at 22:12 -0400, Jim Giner wrote: > Obviously you have designed a search/decision mechanism that suits your > needs. The OP did not present a problem of such magnitude. He only asked > how to handle a decision process the most efficient way - with no mention of > higher goal

Re: [PHP] PHP delete confirmation

2011-04-28 Thread Sharl.Jimh.Tsin
yes,i agree with you,Richard L. Buskirk. process by client-side script,such as javascript is the best and convenient way. Best regards, Sharl.Jimh.Tsin (From China **Obviously Taiwan INCLUDED**) 2011/4/29 : > This can be done in the delete.php file OR use javascript onClick to confirm > the in