Re: [PHP] Capitalization of variable

2008-06-19 Thread Paul Novitski
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 usage, capitalizing the first letter of every word does not correctly capitalize addresses in

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,

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 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] 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 usage,

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

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, and if you

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

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: ?php $uri_vars = explode('/', $_SERVER['PATH_INFO']); foreach ($uri_vars as $var) if ($var != ) echo $var . br; ?

[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

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.

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

2008-06-19 Thread Richard Heyes
Fowarded message. -- Richard Heyes ---BeginMessage--- 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 and

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'd

Re: [PHP] Capitalization of variable

2008-06-19 Thread tedd
At 7:58 AM -0400 6/19/08, Jason Pruim wrote: pitch 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

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

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

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] 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: pitch 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

Re: [PHP] Variables

2008-06-19 Thread tedd
At 12:23 AM -0400 6/19/08, Robert Cummings wrote: ?php $GLOBALS['mysql_host'] = $_REQUEST['host']; ? 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

[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

[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

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

2008-06-19 Thread Ryan S
clip 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 is

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 On

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 -- /Daniel P. Brown Dedicated Servers - Intel 2.4GHz w/2TB bandwidth/mo. starting at just

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 is

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

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 stop me from

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 Cummings wrote: And

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 about

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 anywhere of your

[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

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: opinion My personal feelings are that the US Postal Service and the US Military are the only parts of the US government that actually work. /opinion +1 I wonder how many of us on the list served. It's got to be

[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] Discussion of method -- config files

2008-06-19 Thread Daniel Brown
My preference for years has been like so: ?php // inc/config.php # # Handles basic configuration settings. # // DATABASE SETTINGS // The name of the database. $_DB['name'] = some_database; // The user with access to the above database. $_DB['user'] = some_user; // The password for the

[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 (HH-60)

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] 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 value assignment? As far as i know they both do the

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

Re: [PHP] substr?

2008-06-19 Thread Daniel Brown
Try this: ?php $filename = 'this_example.php.file.backup.phps'; echo substr($filename,(strrpos($filename,'.') + 1),strlen($filename)).\n; ? -- /Daniel P. Brown Dedicated Servers - Intel 2.4GHz w/2TB bandwidth/mo. starting at just $59.99/mo. with no contract! Dedicated servers, VPS, and

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 user

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 Wed, Jun

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

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 value assignment? As far as i

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 value assignment? As far as i

[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

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, Tedd, wouldn't you

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

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 them, but

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 been

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

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 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 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 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 war

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 function code

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 people to

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 the field and

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 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] 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: ?php $filename = 'this_example.php.file.backup.phps'; echo substr($filename,(strrpos($filename,'.') + 1),strlen($filename)).\n; ? -- PHP General Mailing List

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: snip 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] 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

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() command

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: [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: snip 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

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. /Per Jessen, Zürich

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 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] 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 interest to a

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] 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 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] 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 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

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 or

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... nothing major.

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

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

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 inflection to

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 case, one

[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: code ?php if (exif_imagetype('image.gif') != IMAGETYPE_GIF) { echo 'The picture is not a

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; if

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(.,

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

[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] 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' = '[EMAIL PROTECTED]',

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

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' = '[EMAIL PROTECTED]',

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 Inc.', ),

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 of each array that's

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

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 PHP syntax, except that you've got an

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