php-general Digest 28 Apr 2011 08:03:55 -0000 Issue 7286

2011-04-28 Thread php-general-digest-help
php-general Digest 28 Apr 2011 08:03:55 - Issue 7286 Topics (messages 312497 through 312533): Re: Newsgroup status 312497 by: Joshua Kehn 312498 by: Steve Staples 312499 by: Joshua Kehn 312500 by: Jason Pruim 312505 by: Geoff Lane 312510 by:

php-general Digest 28 Apr 2011 21:12:52 -0000 Issue 7287

2011-04-28 Thread php-general-digest-help
php-general Digest 28 Apr 2011 21:12:52 - Issue 7287 Topics (messages 312534 through 312544): Re: Destroying cookies... not working 312534 by: Geoff Lane Re: Javascript detection 312535 by: Per Jessen 312542 by: tedd 312544 by: Ashley Sheridan Nested

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 is

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 rpdw...@earthlink.net 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

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 unsubscribe,

[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: ?xml version=1.0 encoding=UTF-8? pool xmlns:xi=http://www.w3.org/2001/XInclude; query name=foo sql db=oracleLorem ipsum/sql   

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

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

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 the

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

[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, from

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

[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

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:

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:

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

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,

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

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?

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

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

[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

[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 ?php If($_GET['confirm'] == Yes) { //Delete actions }else If($_GET['confirm'] == No) { //No Delete actions. }else{ //display a delete confirmation and remember to carry required