Re: [PHP] climb up the path

2008-06-19 Thread Iv Ray
Richard Heyes wrote: i need a way to get the path to the parent folder of the folder i am in. one "dirty" way i found is this - require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . ".." . DIRECTORY_SEPARATOR . "config.php"); i can also explode() and rea

Re: [PHP] climb up the path

2008-06-19 Thread Iv Ray
Jim Lucas wrote: > Iv Ray wrote: >> Jim Lucas wrote: > So, saying that it is outside the source does not tell me if it is > outside the document root. A, right. It is outside the document root. > Use your include_path php_ini setting A, right... Didn't think of it. Actually, I do not like th

Re: [PHP] RE: Military Service WAS [PHP] Capitalization of variable

2008-06-19 Thread Sancar Saran
On Thursday 19 June 2008 18:25:10 Jay Blanchard wrote: > [snip] > I wonder how many of us on the list served. It's got to be more > than just you and I, Tedd, wouldn't you think? > [/snip] > > U.S. Air Force The Turkish Gendarmerie (Jandarma Genel Komutanligi) -- PHP General Mailing List (

Re: [PHP] Case sensitive password

2008-06-19 Thread tedd
At 4:06 PM -0400 6/19/08, Andrew Ballard wrote: I could be wrong, but I didn't see anything about a username. It sounds to me more like it is a single password shared with all the people who should have access to a specific, non-personalized area of the site. It certainly wouldn't be my preferred

Re: [PHP] Associative Arrays

2008-06-19 Thread Robert Cummings
On Thu, 2008-06-19 at 19:59 -0700, Paul Novitski wrote: > At 6/19/2008 07:36 PM, Robert Cummings wrote: > > > >> 54321 => array( > > > >> 'mail' => '[EMAIL PROTECTED]', > > > >> 'companyName' => 'Asdfu Corp.', > > > >> ), > > > >> ); > > > > > > > > > > > > This is the right P

Re: [PHP] Discussion of method -- config files

2008-06-19 Thread tedd
At 5:31 PM +0300 6/19/08, Sancar Saran wrote: Hi tedd My final solution was. class conf { public static $vals = array(); // config array ... } conf::$vals['mysql_host'] = 'localhost'; conf::$vals['mysql_user'] = "[EMAIL PROTECTED]"; you can access anywhere of your script and you won

Re: [PHP] Associative Arrays

2008-06-19 Thread Paul Novitski
At 6/19/2008 07:36 PM, Robert Cummings wrote: > >> 54321 => array( > >> 'mail' => '[EMAIL PROTECTED]', > >> 'companyName' => 'Asdfu Corp.', > >> ), > >> ); > > > > > > This is the right PHP syntax, except that you've got an extraneous comma > > before the closing parenthesis

Re: [PHP] Associative Arrays

2008-06-19 Thread Robert Cummings
On Fri, 2008-06-20 at 11:19 +1000, Chris wrote: > Paul Novitski wrote: > > At 6/19/2008 05:55 PM, VamVan wrote: > >> How to create an associative array of this kind in PHP? > >> > >> return array( > >> 12345 => array( > >> 'mail' => '[EMAIL PROTECTED]', > >> 'companyName' => 'Asdf

Re: [PHP] Associative Arrays

2008-06-19 Thread Chris
Paul Novitski wrote: > At 6/19/2008 05:55 PM, VamVan wrote: >> How to create an associative array of this kind in PHP? >> >> return array( >> 12345 => array( >> 'mail' => '[EMAIL PROTECTED]', >> 'companyName' => 'Asdf Inc.', >> ), >> 54321 => array( >> 'mail' => '[EMA

Re: [PHP] Associative Arrays

2008-06-19 Thread Paul Novitski
At 6/19/2008 05:55 PM, VamVan wrote: How to create an associative array of this kind in PHP? return array( 12345 => array( 'mail' => '[EMAIL PROTECTED]', 'companyName' => 'Asdf Inc.', ), 54321 => array( 'mail' => '[EMAIL PROTECTED]', 'companyName' => 'Asdfu C

Re: [PHP] Associative Arrays

2008-06-19 Thread Shiplu
On Thu, Jun 19, 2008 at 8:55 PM, VamVan <[EMAIL PROTECTED]> wrote: > Hi, > > How to create an associative array of this kind in PHP? > > return array( >12345 => array( > 'mail' => '[EMAIL PROTECTED]', > 'companyName' => 'Asdf Inc.', >), >54321 => array( > 'mail' => '[EM

[PHP] Associative Arrays

2008-06-19 Thread VamVan
Hi, How to create an associative array of this kind in PHP? return array( 12345 => array( 'mail' => '[EMAIL PROTECTED]', 'companyName' => 'Asdf Inc.', ), 54321 => array( 'mail' => '[EMAIL PROTECTED]', 'companyName' => 'Asdfu Corp.', ), ); Thanks

Re: [PHP] Case sensitive password

2008-06-19 Thread Kyle Browning
Why not md5 the password, and store the md5 encryption. Then when they type something in, md5 it and compare the md5 strings. That will ensure that it is Case Sensitive On Thu, Jun 19, 2008 at 2:04 PM, R.C. <[EMAIL PROTECTED]> wrote: > Thank you Daniel, I think that did the trick. Am checking t

Re: [PHP] substr?

2008-06-19 Thread Philip Thompson
RTFM: http://www.php.net/strrpos Hehe =D "Find position of last occurrence of a char in a string" This avoids the extension containing multiple '.'s. ~Phil On Jun 19, 2008, at 1:02 PM, Jason Pruim wrote: Know what I found that works most reliably though? $filenameExploded = explode(".", $fi

Re: [PHP] Case sensitive password

2008-06-19 Thread R.C.
Thank you Daniel, I think that did the trick. Am checking this out now... Best R.C. ""Daniel Brown"" <[EMAIL PROTECTED]> wrote in message > > session_start(); > > > > $_SESSION ['userpass'] = $_POST ['pass']; > > $_SESSION ['authuser'] = 0; > > > > $login = "VIDEO"; > > $login2 = "video"; > >

[PHP] exif_imagetype and constant confusion

2008-06-19 Thread eric cash
Stupid question time! I can't find my answer anywhere, sorry about this... The nature of the return value of exif_imagetype() is baffling me. The php manual uses one simple example like this: okay, cool. the return value is the constant IMAGETYPE_GIF. of course if you do something

Re: [PHP] Case sensitive password

2008-06-19 Thread Daniel Brown
On Thu, Jun 19, 2008 at 4:18 PM, R.C. <[EMAIL PROTECTED]> wrote: > Andrew, > > That is correct. Only ONE password to access a restricted page for selected > people. But... they want to make that ONE password case-insensitive. I > added the following code with 2 variables now, one being upper cas

Re: [PHP] Re: Military Service WAS [PHP] Capitalization of variable

2008-06-19 Thread Daniel Brown
On Thu, Jun 19, 2008 at 4:16 PM, Stut <[EMAIL PROTECTED]> wrote: > On 19 Jun 2008, at 20:27, Daniel Brown wrote: >> >> Once again, keep in mind that, despite whatever the >> black-and-white may indicated below, there's zero hostility or offense >> meant herein. Sometimes, due to the lack of infle

Re: [PHP] Case sensitive password

2008-06-19 Thread R.C.
Andrew, That is correct. Only ONE password to access a restricted page for selected people. But... they want to make that ONE password case-insensitive. I added the following code with 2 variables now, one being upper case, one being lower case but that, of course, doesn't cover all the variato

Re: [PHP] Re: Military Service WAS [PHP] Capitalization of variable

2008-06-19 Thread Stut
On 19 Jun 2008, at 20:27, Daniel Brown wrote: Once again, keep in mind that, despite whatever the black-and-white may indicated below, there's zero hostility or offense meant herein. Sometimes, due to the lack of inflection to differentiate, it may seem otherwise. Likewise... On Thu, Jun 19

Re: [PHP] Case sensitive password

2008-06-19 Thread Andrew Ballard
On Thu, Jun 19, 2008 at 3:11 PM, tedd <[EMAIL PROTECTED]> wrote: > At 8:59 AM -0700 6/19/08, R.C. wrote: >> >> Tedd, >> >> thank you for your input but it's the site client who wants the user to >> input this ONE password either upper or lower case...it's for accessing a >> protected page... nothin

Re: [PHP] Case sensitive password

2008-06-19 Thread R.C.
Hi Tedd, It is NOT the user who determines this ONE password, it's the client... he gives it out to selected folks to input For example: he says to a few people: use "video" to access this page okay? He would like to make this word case-insensitive so the few people can type in either Video o

Re: [PHP] Re: Military Service WAS [PHP] Capitalization of variable

2008-06-19 Thread tedd
Hehe, for you it is a matter of choice, In 2 years from now I will start my service duty at the combat - we have to serv - this is mandatoy in Israel. Regards, Nitsan It was not a matter of choice for me -- I was drafted (1966) into the US Army during Vietnam. You see, everyone was drafted b

Re: [PHP] Re: Military Service WAS [PHP] Capitalization of variable

2008-06-19 Thread Daniel Brown
Once again, keep in mind that, despite whatever the black-and-white may indicated below, there's zero hostility or offense meant herein. Sometimes, due to the lack of inflection to differentiate, it may seem otherwise. On Thu, Jun 19, 2008 at 3:11 PM, Steve Edberg <[EMAIL PROTECTED]> wrote: >

Re: [PHP] Re: Military Service WAS [PHP] Capitalization of variable

2008-06-19 Thread Daniel Brown
On Thu, Jun 19, 2008 at 3:07 PM, Per Jessen <[EMAIL PROTECTED]> wrote: > > Dan, no offence taken nor meant, but 1) you have very little idea of who > may or may not be interested in this, and 2) just because a subject > might conceivably be of interest to "a large portion of us" does not > make it

Re: [PHP] Case sensitive password

2008-06-19 Thread tedd
At 8:59 AM -0700 6/19/08, R.C. wrote: Tedd, thank you for your input but it's the site client who wants the user to input this ONE password either upper or lower case...it's for accessing a protected page... nothing major. Nothing major until it is. As for the client, I always said "Everyone

Re: [PHP] Re: Military Service WAS [PHP] Capitalization of variable

2008-06-19 Thread Steve Edberg
At 2:59 PM -0400 6/19/08, Daniel Brown wrote: On Thu, Jun 19, 2008 at 2:49 PM, Per Jessen <[EMAIL PROTECTED]> wrote: Call me .. uh no, I'm getting sick ... you guys are so completely and utterly off-topic - please take it off-line. No offense meant at all, Per, but I actually think the

Re: [PHP] Re: Military Service WAS [PHP] Capitalization of variable

2008-06-19 Thread Per Jessen
Daniel Brown wrote: > On Thu, Jun 19, 2008 at 2:49 PM, Per Jessen <[EMAIL PROTECTED]> wrote: >> >> Call me .. uh no, I'm getting sick ... you guys are so completely and >> utterly off-topic - please take it off-line. > > No offense meant at all, Per, but I actually think the thread is > of in

Re: [PHP] Re: Military Service WAS [PHP] Capitalization of variable

2008-06-19 Thread Daniel Brown
On Thu, Jun 19, 2008 at 2:49 PM, Per Jessen <[EMAIL PROTECTED]> wrote: > > Call me .. uh no, I'm getting sick ... you guys are so completely and > utterly off-topic - please take it off-line. No offense meant at all, Per, but I actually think the thread is of interest to a large portion of us

Re: [PHP] losing mysql connection during cron job

2008-06-19 Thread Paul Novitski
At 6/18/2008 02:47 PM, Paul Novitski wrote: I've got a simple script running as a cron job that's getting intermittent "Lost connection to MySQL server during query" errors. At 6/18/2008 10:43 PM, Chris wrote: You need to do a mysql_close(); mysql_connect(...) before mysql_query works again

Re: [PHP] Re: Military Service WAS [PHP] Capitalization of variable

2008-06-19 Thread Per Jessen
Wolf wrote: >> > >> > www.goarmy.com >> >> >> http://www.gocoastguard.com/ >> >> Call me biased. ;-P >> > > http://www.airforce.com/ > > Call me biased too. :-P Call me .. uh no, I'm getting sick ... you guys are so completely and utterly off-topic - please take it off-line. /

Re: [Fwd: Re: [PHP] Please stop me from tearing my hair out.]

2008-06-19 Thread Robert Cummings
On Thu, 2008-06-19 at 10:53 -0700, James Ausmus wrote: > On Thu, Jun 19, 2008 at 7:54 AM, Robert Cummings <[EMAIL PROTECTED]> wrote: > > > Ummm, yes it is :) Static variables have persistence beyond the function > > call and thus beyond the function scope itself. > > > Umm, no it's not. Static v

Re: [PHP] substr?

2008-06-19 Thread Daniel Brown
On Thu, Jun 19, 2008 at 1:53 PM, Philip Thompson <[EMAIL PROTECTED]> wrote: > Does that get a different result than mine? Sorry, Phil, I hadn't even been paying much attention to the thread, and saw that it just kept going, so I sent in a suggestion. Both of our things do the exact same thing,

Re: [PHP] substr?

2008-06-19 Thread Jason Pruim
Know what I found that works most reliably though? $filenameExploded = explode(".", $filename); that way, if I have a file like this: filename.todaysdate.todaystime.extension I don't end up with the extension being: .todaysdate.todaystime.extension :) Unless I was using the substr() comman

Re: [PHP] Case sensitive password

2008-06-19 Thread R.C.
I've tried some of the methods mentioned in earlier posts, but I don't understand this correctly. Here is the code I have to validate a hard corded password to access a page, which is in upper case WHERE do I input the code to make sure that whatever case a user inputs this word, it will stil

Re: [Fwd: Re: [PHP] Please stop me from tearing my hair out.]

2008-06-19 Thread James Ausmus
On Thu, Jun 19, 2008 at 7:54 AM, Robert Cummings <[EMAIL PROTECTED]> wrote: > Ummm, yes it is :) Static variables have persistence beyond the function > call and thus beyond the function scope itself. Umm, no it's not. Static variables have persistence, but are scoped just like normal variables

Re: [PHP] substr?

2008-06-19 Thread Philip Thompson
Does that get a different result than mine? ~Phil On Jun 19, 2008, at 10:44 AM, Daniel Brown wrote: Try this: echo substr($filename,(strrpos($filename,'.') + 1),strlen($filename))."\n"; ?> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/un

Re: [PHP] Re: Military Service WAS [PHP] Capitalization of variable

2008-06-19 Thread Nitsan Bin-Nun
Dan i'm 16 years old, currently my monthly salary (working as php freelancer) almost catching my dad's and he is living good. In 2 years from now I have to serv, probably at the battle field (I'm healthy qualified) and usualy the place where guys like me being send to includes additional 2 years -

RE: [PHP] Re: Military Service WAS [PHP] Capitalization of variable

2008-06-19 Thread Jay Blanchard
[snip] > www.goarmy.com http://www.gocoastguard.com/ [/snip] http://www.airforce.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Military Service WAS [PHP] Capitalization of variable

2008-06-19 Thread Wolf
--- Daniel Brown <[EMAIL PROTECTED]> wrote: > On Thu, Jun 19, 2008 at 1:06 PM, Iv Ray <[EMAIL PROTECTED]> wrote: > > Dan Joseph wrote: > >> > >> I guess the main problem is people don't realize that there are a LOT of > >> things you can do in the military other than just taking a gun out into > >

Re: [PHP] Re: Military Service WAS [PHP] Capitalization of variable

2008-06-19 Thread Daniel Brown
On Thu, Jun 19, 2008 at 1:06 PM, Iv Ray <[EMAIL PROTECTED]> wrote: > Dan Joseph wrote: >> >> I guess the main problem is people don't realize that there are a LOT of >> things you can do in the military other than just taking a gun out into >> the >> field and firing at the enemy. If you want peop

Re: [PHP] Discussion of method -- config files

2008-06-19 Thread Iv Ray
tedd wrote: Hi gang: More of a question of method rather than of "right" or "wrong" -- of the two methods mentioned here, which way would be "better" and why? Initially I used to access global variables using the "global" keyword - function foo() { global $bar; } However if the functi

Re: [PHP] Re: Military Service WAS [PHP] Capitalization of variable

2008-06-19 Thread Daniel Brown
On Thu, Jun 19, 2008 at 12:59 PM, Dan Joseph <[EMAIL PROTECTED]> wrote: > > I personally never agreed with anyone until the last couple years that there > should be mandatory military service after high school. The reason being: > What if I had something planned for my life, why would fighting a w

Re: [PHP] Re: Military Service WAS [PHP] Capitalization of variable

2008-06-19 Thread Iv Ray
Dan Joseph wrote: I guess the main problem is people don't realize that there are a LOT of things you can do in the military other than just taking a gun out into the field and firing at the enemy. If you want people to believe that mandatory service is a good thing, they have to do more to get

RE: [PHP] Re: Military Service WAS [PHP] Capitalization of variable

2008-06-19 Thread Wolf
Jay Blanchard <[EMAIL PROTECTED]> wrote: > [snip] > I don't want to start any arguments or flame wars, but it's been > my opinion for years that the US should require at least one year in > the armed services as well. If you want freedom and privileges, you > should earn them, not feel

Re: [PHP] Re: Military Service WAS [PHP] Capitalization of variable

2008-06-19 Thread Dan Joseph
On Thu, Jun 19, 2008 at 12:45 PM, Jay Blanchard <[EMAIL PROTECTED]> wrote: > [snip] > I don't want to start any arguments or flame wars, but it's been > my opinion for years that the US should require at least one year in > the armed services as well. If you want freedom and privileges, you >

RE: [PHP] Re: Military Service WAS [PHP] Capitalization of variable

2008-06-19 Thread Jay Blanchard
[snip] I don't want to start any arguments or flame wars, but it's been my opinion for years that the US should require at least one year in the armed services as well. If you want freedom and privileges, you should earn them, not feel automatically entitled to them by birth. [/snip] I do not

Re: [PHP] Re: Military Service WAS [PHP] Capitalization of variable

2008-06-19 Thread Daniel Brown
On Thu, Jun 19, 2008 at 12:37 PM, Nitsan Bin-Nun <[EMAIL PROTECTED]> wrote: > Hehe, for you it is a matter of choice, > In 2 years from now I will start my service duty at the combat - we have to > serv - this is mandatoy in Israel. I don't want to start any arguments or flame wars, but it's b

Re: [PHP] mail problem (newlines becomes =0A)

2008-06-19 Thread Daniel Brown
On Thu, Jun 19, 2008 at 12:02 PM, Jim Lucas <[EMAIL PROTECTED]> wrote: > > umm If this didn't work, most of my HEREDOC sections would not work. > > AFAIK I have always been able to use name-keyed arrays in my HEREDOC. > > I have always wrapped them with {...} to allow PHP to better identify the

Re: [PHP] Re: Military Service WAS [PHP] Capitalization of variable

2008-06-19 Thread Nitsan Bin-Nun
Hehe, for you it is a matter of choice, In 2 years from now I will start my service duty at the combat - we have to serv - this is mandatoy in Israel. Regards, Nitsan On 19/06/2008, Jason Pruim <[EMAIL PROTECTED]> wrote: > > > On Jun 19, 2008, at 11:35 AM, Daniel Brown wrote: > > On Thu, Jun 19,

Re: [PHP] Discussion of method -- config files

2008-06-19 Thread Robert Cummings
On Thu, 2008-06-19 at 18:37 +0300, Sancar Saran wrote: > Well, after reaching this > > $GLOBALS['live']['current']['c']['modules']['traffics']['url'] = 'blah'; > > I change my mind to use public static variables. > > using conf::$vars (or someting like that) was more pratic than using $GLOBALS

Re: [PHP] Re: Military Service WAS [PHP] Capitalization of variable

2008-06-19 Thread Wolf
Jason Pruim <[EMAIL PROTECTED]> wrote: > > On Jun 19, 2008, at 11:35 AM, Daniel Brown wrote: > > > On Thu, Jun 19, 2008 at 11:25 AM, Jay Blanchard > > <[EMAIL PROTECTED]> wrote: > >> [snip] > >> I wonder how many of us on the list served. It's got to be more > >> than just you and I, T

[PHP] Re: Military Service WAS [PHP] Capitalization of variable

2008-06-19 Thread Jason Pruim
On Jun 19, 2008, at 11:35 AM, Daniel Brown wrote: On Thu, Jun 19, 2008 at 11:25 AM, Jay Blanchard <[EMAIL PROTECTED]> wrote: [snip] I wonder how many of us on the list served. It's got to be more than just you and I, Tedd, wouldn't you think? [/snip] U.S. Air Force United States Coa

Re: [PHP] mail problem (newlines becomes =0A)

2008-06-19 Thread Jim Lucas
Daniel Brown wrote: Forwarded. Accidentally clicked "reply" directly to Nitsan. Sorry about that. :-\ On Thu, Jun 19, 2008 at 2:47 AM, Nitsan Bin-Nun <[EMAIL PROTECTED]> wrote: Umm just for general knowledge, whats the difference between HEREDOC to simple "" assignment? As far as i k

Re: [PHP] mail problem (newlines becomes =0A)

2008-06-19 Thread Jim Lucas
Daniel Brown wrote: Forwarded. Accidentally clicked "reply" directly to Nitsan. Sorry about that. :-\ On Thu, Jun 19, 2008 at 2:47 AM, Nitsan Bin-Nun <[EMAIL PROTECTED]> wrote: Umm just for general knowledge, whats the difference between HEREDOC to simple "" assignment? As far as i k

Re: [PHP] Case sensitive password

2008-06-19 Thread R.C.
Tedd, thank you for your input but it's the site client who wants the user to input this ONE password either upper or lower case...it's for accessing a protected page... nothing major. But generally I agree... if the user has selected a password, that is what he/she wants and it should be left al

Re: [PHP] Case sensitive password

2008-06-19 Thread R.C.
Nathan, Thank you ... very thorough. Best R.C. ""Nathan Nobbe"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > i hate posting the same answer to a given question thats already been > posted, but i had this all typed in when chris submitted his answer, so here > it is again.. > > On

Re: [PHP] Case sensitive password

2008-06-19 Thread R.C.
Chris, Thank you. That worked good. Appreciate the assistance. Best R.C. "Chris" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > R.C. wrote: > > Thank you for your reply. The password is not stored, actually, like in a > > databse. We're only dealing with one password. When the

Re: [PHP] substr?

2008-06-19 Thread Daniel Brown
Try this: -- Dedicated Servers - Intel 2.4GHz w/2TB bandwidth/mo. starting at just $59.99/mo. with no contract! Dedicated servers, VPS, and hosting from $2.50/mo. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Discussion of method -- config files

2008-06-19 Thread Sancar Saran
Well, after reaching this $GLOBALS['live']['current']['c']['modules']['traffics']['url'] = 'blah'; I change my mind to use public static variables. using conf::$vars (or someting like that) was more pratic than using $GLOBALS directly. You can set config each of your classes. Regards Sancar

[PHP] mail problem (newlines becomes =0A)

2008-06-19 Thread Daniel Brown
Forwarded. Accidentally clicked "reply" directly to Nitsan. Sorry about that. :-\ On Thu, Jun 19, 2008 at 2:47 AM, Nitsan Bin-Nun <[EMAIL PROTECTED]> wrote: > Umm just for general knowledge, whats the difference between HEREDOC to > simple "" assignment? > As far as i know they both do

Re: [PHP] RE: Military Service WAS [PHP] Capitalization of variable

2008-06-19 Thread Dan Shirah
> > > > U.S. Air Force Air Force here also, still currently serving. Dan

[PHP] Re: Military Service WAS [PHP] Capitalization of variable

2008-06-19 Thread Daniel Brown
On Thu, Jun 19, 2008 at 11:25 AM, Jay Blanchard <[EMAIL PROTECTED]> wrote: > [snip] >I wonder how many of us on the list served. It's got to be more > than just you and I, Tedd, wouldn't you think? > [/snip] > > U.S. Air Force > United States Coast Guard ARS Helicopter Rescue Swimmer

Re: [PHP] Discussion of method -- config files

2008-06-19 Thread Daniel Brown
My preference for years has been like so: Then, in a general file, I include all files that will need to be included across all pages like so: And without writing out all files, as I'm sure your imagination should suffice, I'll show the database basics. First, in an include fil

[PHP] RE: Military Service WAS [PHP] Capitalization of variable

2008-06-19 Thread Jay Blanchard
[snip] I wonder how many of us on the list served. It's got to be more than just you and I, Tedd, wouldn't you think? [/snip] U.S. Air Force -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Capitalization of variable

2008-06-19 Thread Daniel Brown
On Thu, Jun 19, 2008 at 9:17 AM, tedd <[EMAIL PROTECTED]> wrote: > > PS: > > My personal feelings are that the US Postal Service and the US Military are > the only parts of the US government that actually work. > +1 I wonder how many of us on the list served. It's got to be more than j

[PHP] survey request

2008-06-19 Thread [EMAIL PROTECTED]
Dear member, in cooperation with the software engineering research group at Free University of Berlin (Freie Universität Berlin), we are currently conducting an empirical survey on time consumption of participants in Open Source/Free Software projects. In this survey we want to find out how mu

Re: [PHP] Discussion of method -- config files

2008-06-19 Thread Robert Cummings
On Thu, 2008-06-19 at 17:31 +0300, Sancar Saran wrote: > Hi tedd > > My final solution was. > > class conf { > > public static $vals = array(); // config array > ... > } > > conf::$vals['mysql_host'] = 'localhost'; > conf::$vals['mysql_user'] = "[EMAIL PROTECTED]"; > > you can access an

Re: [PHP] Case sensitive password

2008-06-19 Thread Daniel Brown
On Thu, Jun 19, 2008 at 12:45 AM, Nathan Nobbe <[EMAIL PROTECTED]> wrote: > i hate posting the same answer to a given question thats already been > posted, but i had this all typed in when chris submitted his answer, so here > it is again.. One of the very, very few things that pisses me off a

Re: [PHP] Discussion of method -- config files

2008-06-19 Thread Robert Cummings
On Thu, 2008-06-19 at 10:04 -0400, tedd wrote: > Hi gang: > > More of a question of method rather than of "right" or "wrong" -- of > the two methods mentioned here, which way would be "better" and why? > > 1. Setting $GLOBALS one time as shown here. > > At 12:23 AM -0400 6/19/08, Robert Cumming

Re: [Fwd: Re: [PHP] Please stop me from tearing my hair out.]

2008-06-19 Thread Robert Cummings
On Thu, 2008-06-19 at 12:33 +0100, Richard Heyes wrote: > Fowarded message. > > email message attachment (Re: [PHP] Please stop me from tearing my > hair out..eml) > > Forwarded Message > > From: Byron <[EMAIL PROTECTED]> > > To: [EMAIL PROTECTED] > > Subject: Re: [PHP] Please st

Re: [PHP] substr?

2008-06-19 Thread Philip Thompson
On Jun 17, 2008, at 8:01 AM, Dan Shirah wrote: The code I'm having issues with is this: $filename = $_FILES['userfile']['name']; // Get the name of the file (including file extension). $ext = substr($filename, strpos($filename,'.'), strlen($filename)-1); // Get the extension from

Re: [PHP] GD - Print Animated GIF

2008-06-19 Thread Per Jessen
Stephen Pynenburg wrote: > Hey All, > I'm new to the list, but hopefully it's a nice one :) > Anyway, my problem is fairly straightforward, but there doesn't seem > to be anything on it anywhere. When I read an animated GIF with > imagecreatefromgif(), then print it out with imagegif(), the result

Re: [PHP] Re: Search like php.net's URL thingy

2008-06-19 Thread Daniel Brown
Ry, Make sure you also disable the ability to add in your own site, and even similar competitors such as tinyurl.com. Otherwise, you'll get something like this: http://ezee.se/30 -- Dedicated Servers - Intel 2.4GHz w/2TB bandwidth/mo. starting at just $59.99/mo. with no contra

Re: [PHP] Discussion of method -- config files

2008-06-19 Thread Sancar Saran
Hi tedd My final solution was. class conf { public static $vals = array(); // config array ... } conf::$vals['mysql_host'] = 'localhost'; conf::$vals['mysql_user'] = "[EMAIL PROTECTED]"; you can access anywhere of your script and you won't need to pollute $GLOBALS. Regards Sancar O

Re: [PHP] Re: Search like php.net's URL thingy

2008-06-19 Thread Ryan S
> I really dont see what anybody could gain by spamming this form but > anyway it does check to make sure the person submits something that > starts with "http" via strstr (after bringing it down to lowercase, > thats why i didnt use stristr, and because it checks just "http", > https too

[PHP] SOAP Client - Cannot use object of type stdClass as array

2008-06-19 Thread Dan Joseph
Hi, I have a web service: http://new.vehicletransportusa.com/v2/services/URS.QuoteServices.wsdl I wrote a simple client to connect to it and get a quote, however I am running into a snag. I get the below error when trying to run it. I've tried it as an array, as an object, nothing seems to wor

[PHP] Discussion of method -- config files

2008-06-19 Thread tedd
Hi gang: More of a question of method rather than of "right" or "wrong" -- of the two methods mentioned here, which way would be "better" and why? 1. Setting $GLOBALS one time as shown here. At 12:23 AM -0400 6/19/08, Robert Cummings wrote: And the variables are defined in config.php --

Re: [PHP] Variables

2008-06-19 Thread tedd
At 12:23 AM -0400 6/19/08, Robert Cummings wrote: I've intentionally used request since I don't know if you would do it via $_POST or $_GET. Additionally, one would hope you'd check/filter/process the submitted value before being so careless as to assign it as I've done above. Cheers, Rob. R

Re: [PHP] Capitalization of variable

2008-06-19 Thread Jason Pruim
On Jun 19, 2008, at 9:17 AM, tedd wrote: At 7:58 AM -0400 6/19/08, Jason Pruim wrote: Or I could periodically run your list through our software for a small fee :) On the bright side though, Not only would I be able to fix the case to how you want it, Even with all those dutch names I s

Re: [PHP] Online Job Available

2008-06-19 Thread tedd
At 4:47 PM -0700 6/18/08, Brian Dunning wrote: Yes, I'm sure it's legit, thus your obviously real 2 names and 3 email addresses. :-) On Jun 18, 2008, at 7:33 AM, Brock Diegel wrote: -snip- spam Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -

Re: [PHP] Case sensitive password

2008-06-19 Thread tedd
At 9:36 PM -0700 6/18/08, R.C. wrote: I have coded a php page that accepts a password. What is the code to make sure the password entered is NOT case-sensitive? Thanks much R.C. Why? If a user has selected a password, then leave it alone and don't change it -- it's their password. If a us

Re: [PHP] Capitalization of variable

2008-06-19 Thread tedd
At 11:41 PM -0400 6/18/08, Ron Piggott wrote: How do I make the first letter of a variable be a capital? I am using this with names. If the user types "ron" I want to save it as "Ron". Thanks for your help. Ron Not everyone wants their name capitalized. Cheers, tedd -- --- http://sper

Re: [PHP] Capitalization of variable

2008-06-19 Thread tedd
At 7:58 AM -0400 6/19/08, Jason Pruim wrote: Or I could periodically run your list through our software for a small fee :) On the bright side though, Not only would I be able to fix the case to how you want it, Even with all those dutch names I see around me at least. But I could verify that

Re: [PHP] Capitalization of variable

2008-06-19 Thread Jason Pruim
On Jun 19, 2008, at 3:57 AM, Nathan Nobbe wrote: On Wed, Jun 18, 2008 at 11:47 PM, Paul Novitski <[EMAIL PROTECTED] > wrote: At 6/18/2008 09:38 PM, Nathan Nobbe wrote: $streetAddr = "817 17th ST, DENVER COLORADO"; echo ucwords(strtolower($streetAddr)); // 817 17th St, Denver Colorado I

[Fwd: Re: [PHP] Please stop me from tearing my hair out.]

2008-06-19 Thread Richard Heyes
Fowarded message. -- Richard Heyes --- Begin Message --- now it says this? *Parse error*: syntax error, unexpected '=', expecting ',' or ';' in *C:\wamp\www\achillesweb2\functions.php* on line *14 ?.? * On Thu, Jun 19, 2008 at 10:45 PM, Byron <[EMAIL PROTECTED]> wrote: > okay, so i got static an

Re: [PHP] Please stop me from tearing my hair out.

2008-06-19 Thread Richard Heyes
Byron wrote: Right. I'm getting this error from the following code : *Parse error*: syntax error, unexpected '}' in *C:\wamp\www\achillesweb2\install.php* on line *39 *and I can figure there's probably a bunch of others. If anyone wouldn't mind giving this a read over that'd be really helpful. Fe

[PHP] Please stop me from tearing my hair out.

2008-06-19 Thread Byron
Right. I'm getting this error from the following code : *Parse error*: syntax error, unexpected '}' in *C:\wamp\www\achillesweb2\install.php* on line *39 *and I can figure there's probably a bunch of others. If anyone wouldn't mind giving this a read over that'd be really helpful. Feel free to chip

Re: [PHP] Newbie Question: How to pass URL info to .php script ?

2008-06-19 Thread Chris Scott
You could just use an apache (or other web server) alias: www.test.com/article -> www.test.com/article.php where article.php uses: "; ?>

Re: [PHP] Newbie Question: How to pass URL info to .php script ?

2008-06-19 Thread Nathan Nobbe
On Thu, Jun 19, 2008 at 1:18 AM, Ethan Whitt <[EMAIL PROTECTED]> wrote: > I pasted your example in and it doesn't work for me (again, newbie). I > will play with it and see if I can get it working. My main goal is to have > Ruby-like URL's vs "?var=3425". Is this possible with .php (without > m

Re: [PHP] Newbie Question: How to pass URL info to .php script ?

2008-06-19 Thread Nathan Nobbe
On Thu, Jun 19, 2008 at 1:28 AM, Bob <[EMAIL PROTECTED]> wrote: > Have you tried CodeIgniter http://www.codeigniter.com? > > Not as restrictive as many MVC frameworks and very easy to work with. > > What you wish to achieve can be done with one line. > > $myvar = $this->uri->segment(2); right, a

Re: [PHP] substr?

2008-06-19 Thread Peter Ford
Jim Lucas wrote: Peter Ford wrote: Frank Arensmeier wrote: 17 jun 2008 kl. 22.14 skrev Jim Lucas: Jason Pruim wrote: Hi everyone, I am attempting to adopt some code to work more reliably then how it is now... What I am doing is coding a upload form where people could be uploading .zip fil

Re: [PHP] Capitalization of variable

2008-06-19 Thread Nathan Nobbe
On Wed, Jun 18, 2008 at 11:47 PM, Paul Novitski <[EMAIL PROTECTED]> wrote: > At 6/18/2008 09:38 PM, Nathan Nobbe wrote: > >> $streetAddr = "817 17th ST, DENVER COLORADO"; >> echo ucwords(strtolower($streetAddr)); >> // 817 17th St, Denver Colorado >> > > > I'd like to mention that, in practical us

Re: [PHP] Newbie Question: How to pass URL info to .php script ?

2008-06-19 Thread Jignesh Thummar
Ethan, you can try this: $url = www.test.com/article/3435; echo basename($url); another solution is that you can use explode() function to seprate your url from '/' or you can use regex to parse your url - Jignesh On Thu, Jun 19, 2008 at 8:18 AM, Ethan Whitt <[EMAIL PROTECTED]> wrote: > I pasted

RE: [PHP] Newbie Question: How to pass URL info to .php script ?

2008-06-19 Thread Bob
Have you tried CodeIgniter http://www.codeigniter.com? Not as restrictive as many MVC frameworks and very easy to work with. What you wish to achieve can be done with one line. $myvar = $this->uri->segment(2); http://codeigniter.com/user_guide/libraries/uri.html Likely not to everyone's taste

Re: [PHP] Newbie Question: How to pass URL info to .php script ?

2008-06-19 Thread Ethan Whitt
I pasted your example in and it doesn't work for me (again, newbie). I will play with it and see if I can get it working. My main goal is to have Ruby-like URL's vs "?var=3425". Is this possible with .php (without mod_rewrite / something in the http server?) Thanks, Ethan On Wed, Jun 18, 20