RE: [PHP] Why [?php while (true) { sleep(5); } ?] dies on CLI?

2009-06-11 Thread Ford, Mike
On 11 June 2009 12:00, Ashley Sheridan advised: On Thu, 2009-06-11 at 10:47 +, Jean-Pierre Arneodo wrote: Hi! I'm stuck. I don't understand why the php CLI dies after 3 hours in my script. Any idea to solve? Thanks PHP 5.2.9-0.dotdeb.2 with Suhosin-Patch 0.9.7 (cli) (built: Apr 7

RE: [PHP] alpha/beta/gamma TO $var['alpha']['beta'] = 'gamma'

2009-06-08 Thread Ford, Mike
On , nit...@binnun.co.il advised: function nitsanush($v) { $a = explode(/, $v); if (sizeof($a) 2) { $b = $a; unset($b[0]); return array($a[0] = nitsanush(implode(/, $b))); } else { return array($a[0] = $a[1]); } } //

RE: [PHP] formatting - design question

2009-06-05 Thread Ford, Mike
On 04 June 2009 19:09, PJ advised: Nitsan Bin-Nun wrote: From my experience I tend to use a difference ID for the body tag, for instance body id='homepage' and then format it in my CSS using ID reference: #homepage .classname { color: blue; } This way you can use a default format

RE: [PHP] IE can't download, FF can: SSL ? Need special headers?

2009-05-26 Thread Ford, Mike
On 22 May 2009 20:41, Dee Ayy advised: That's what I had in my first post. What are the rest of your headers? This is what is now deployed and I consider this issue resolved, but allowing spaces in the filename across IE, FF, and Safari browsers would be the real solution. Haven't tried

RE: [PHP] Re: Parsing of forms

2009-05-20 Thread Ford, Mike
On 19 May 2009 17:10, Andrew Ballard advised: On Tue, May 19, 2009 at 10:11 AM, Ford, Mike m.f...@leedsmet.ac.uk wrote: On 19 May 2009 14:37, Daniele Grillenzoni advised: My complaint is this: a I can have a select multiple with a normal name, which is allowed by every spec, but PHP

RE: [PHP] Re: Parsing of forms

2009-05-19 Thread Ford, Mike
On 19 May 2009 14:37, Daniele Grillenzoni advised: My complaint is this: a I can have a select multiple with a normal name, which is allowed by every spec, but PHP requires me to use [] in order to properly retrieve the values. I really don't understand the problem with this -- in fact, I

RE: RES: [PHP] inexplicable behaviour SOLVED

2009-04-28 Thread Ford, Mike
On 27 April 2009 14:21, PJ advised: Ford, Mike wrote: On 26 April 2009 22:59, PJ advised: kranthi wrote: if $Count1 is never referenced after this, then certainly this assignment operation is redundent. but assignment is not the ONLY operation of this statement. if u hav not noticed

RE: [PHP] $_session/$_cookie trouble

2009-04-28 Thread Ford, Mike
On 28 April 2009 15:48, Gary advised: I am trying to set a cookie and a session, but seem to be running into a wall. I have tried different variations, and keep getting the same error message If I have this ?php session_start(); I get this: Warning: session_start()

RE: RES: [PHP] inexplicable behaviour SOLVED

2009-04-27 Thread Ford, Mike
On 26 April 2009 22:59, PJ advised: kranthi wrote: if $Count1 is never referenced after this, then certainly this assignment operation is redundent. but assignment is not the ONLY operation of this statement. if u hav not noticed a post increment operator has been used which will affect the

RE: [PHP] ! and !=

2009-04-23 Thread Ford, Mike
On 23 April 2009 01:05, George Langley advised: Doh, of course! Just not thinking about the scope of the operator. If $var1 = 1, then !$var1 = 0 Thanks everyone! Well, actually, to be strictly accurate, since ! is a Boolean operator, if $var1 = 1 then !$var1 = FALSE. Cheers!

RE: [PHP] extract varying data from array with different formatting

2009-04-17 Thread Ford, Mike
On 14 April 2009 18:12, PJ advised: Jim Lucas wrote: PJ wrote: Jim Lucas wrote: PJ wrote: foreach does a nice job if you want the results identical each time. What can you use to change the formatting of the results dependent on the number of results. Here's an example: foreach (

RE: [PHP] assign associative array values to variables? SOLVED

2009-03-20 Thread Ford, Mike
On 18 March 2009 13:21, PJ advised: Thank you, once again, dg. Could not get it to work... whatever... But I did find an unexpected solution which made things very simple. This is the part for the categories section: if ( isset( $book_categories[$bookID] ) ) { foreach (

RE: [PHP] SESSION array problems

2008-10-02 Thread Ford, Mike
On 01 October 2008 21:24, tedd advised: At 2:38 PM -0500 10/1/08, Afan Pasalic wrote: main reason - if you sort by first or last name you will lose index. this way is index always linked to first/last name. Your point is well taken, but I'm not sorting this. True, the arrays have a

RE: [PHP] Wierd Variable Initialization

2008-09-25 Thread Ford, Mike
On 25 September 2008 03:45, VamVan advised: So guys, I found some thing strange that happened to me yesterday. Its small but kinda freaked me out. So I have a tokenmap.php that I include include in different configuration files. Some are classes and some are simple php files. So in my

RE: [PHP] Re: concatenating with . or ,

2008-08-28 Thread Ford, Mike
On 27 August 2008 18:45, Jay Blanchard advised: tedd-o has been around for a long time and has witnessed the evolution of said blow-ups dolls enough to know when he sees quality, form and function. I think I may be the second oldest regular on the listtedd and I had that discussion

RE: [PHP] Re: concatenating with . or ,

2008-08-28 Thread Ford, Mike
On 27 August 2008 19:04, Jay Blanchard advised: [snip] My memory may be a bit off but I think tedd is around 4017 (he uses rocks if you can recall) [/snip] I am certainly no less virile. Let's see if anyone can GREP this reference for my age; I was born The Day the Music Died Oh, so

RE: [PHP] Re: Variable name as a string

2008-08-28 Thread Ford, Mike
On 28 August 2008 04:26, Micah Gersten advised: You cannot have anything in the brackets for the name in a checkbox group. The brackets specify that it is an array. The name of the array is the key in $_POST that contains the values of the checkbox group that were checked. You can have as

RE: [PHP] Re: Variable name as a string

2008-08-28 Thread Ford, Mike
On 28 August 2008 00:04, tedd advised: At 12:07 AM +0200 8/28/08, Maciek Sokolewicz wrote: input type=check name=my_checkboxes[1] value=1 / 1br / input type=check name=my_checkboxes[2] value=1 / 1br / input type=check name=my_checkboxes[3] value=1 / 1br / input type=check

RE: [PHP] Re: concatenating with . or ,

2008-08-28 Thread Ford, Mike
On 28 August 2008 16:40, tedd advised: I'm really not that old, I wrote my first line of code in college in 1965 -- I even remember the problem. It was how long a swimming pool would take to drain to a trickle with the drain open and a garden hose filling it. Of course, we were given all

RE: [PHP] newbie Q: How to say, if the fileNAME is equal to..., or better yet, if the fileNAME ends with '.jpg'?

2008-08-26 Thread Ford, Mike
On 25 August 2008 00:54, Govinda advised: if (stripos(strrev($file), gpj.) === 0) { echo $file; } note the ===, 3 equals signs here is very important! check the docs for why. == means 'equals', and === means 'is identical to'. Seems like they would do the same thing when

RE: [PHP] newbie Q: How to say, if the fileNAME is equal to..., or better yet, if the fileNAME ends with '.jpg'?

2008-08-26 Thread Ford, Mike
On 26 August 2008 17:15, James Ausmus advised: On Tue, Aug 26, 2008 at 8:57 AM, Ford, Mike [EMAIL PROTECTED] wrote: On 25 August 2008 00:54, Govinda advised: snip Personally, I might be tempted to do something like this: if (($pos = strrchr($file, '.'))!==FALSE): switch

RE: [PHP] SESSION problem

2008-08-19 Thread Ford, Mike
Been on holiday, so coming to this party a bit late, but On Sat 16/08/2008 15:06 Stut wrote: On 16 Aug 2008, at 14:46, tedd wrote: At 2:11 PM +0100 8/16/08, Stut wrote: Ahh, I see the problem. You've never been able to use numbers as keys at the root level of the $_SESSION array.

RE: [PHP] Math Weirdness

2008-07-15 Thread Ford, Mike
On 14 July 2008 20:47, tedd advised: Round-off errors normally don't enter into things unless your doing multiplication and division operations. At that point, what you get back from the operation is an approximation and not the actual number. Bull! Nearly all computer floating point numbers

RE: [PHP] Math Weirdness

2008-07-15 Thread Ford, Mike
On 14 July 2008 21:44, Jay Blanchard advised: [snip] So does that mean your problem is solved? [/snip] It would appear so. I just need to remember to check for absolute values when working with floats. Yeah, that's Computer Science 101 stuff. (Well, it was when I did my degree 30+ years

RE: [PHP] Math Weirdness

2008-07-15 Thread Ford, Mike
On 15 July 2008 14:33, tedd advised: At 11:24 AM +0100 7/15/08, Ford, Mike wrote: On 14 July 2008 20:47, tedd advised: Round-off errors normally don't enter into things unless your doing multiplication and division operations. At that point, what you get back from the operation

RE: [PHP] Math Weirdness

2008-07-15 Thread Ford, Mike
On 15 July 2008 16:07, bruce advised: anyone remember the intel debacle in the 1990's.. when they ate a couple hundred million when they had a math err in one of their coprocessors! Oh, yes! And then, back in the day, there was the DEC arithmetic processor which hung if you happened to

RE: [PHP] looping through a database

2008-06-17 Thread Ford, Mike
On 16 June 2008 21:58, Richard Kurth advised: I am looping through a database of files that are numbers 1 through 10 if number 1 is in the database I what to print out the first table below if it is not then print the else section below. Then loop through the database to see if 2 through 10

RE: [PHP] A problem with fgets()

2008-06-04 Thread Ford, Mike
On 30 May 2008 02:56, Usamah M. Ali advised: So you're confirming that fgets() doesn't necessarily read a whole line? This user note existed on the manual's page of fgets() since 2004 and nobody deleted it or commented about: rstefanowski at wi dot ps dot pl 12-Aug-2004 09:03 Take note

RE: [PHP] Avoid object twice

2008-06-04 Thread Ford, Mike
On 04 June 2008 16:03, Yui Hiroaki advised: NO! That is what I do not want! setting.php need to run mail() function. also setting.php need $googlemapkey. other.php just need $googlemapkey. other .php do not need run mail() function. If I use include, I will get twice email. Same

RE: [PHP] JavaScript and PHP

2008-05-16 Thread Ford, Mike
On 14 May 2008 21:21, tedd advised: At 7:31 PM +0100 5/14/08, Mário Gamito wrote: Hi, I have this HTML/JS page that switches images clicking on the radio buttons and call template.php with the image ID as parameter: http://portulan-online.net/einstein.html Now, I need to make it a PHP

RE: [PHP] JavaScript and PHP

2008-05-16 Thread Ford, Mike
On 16 May 2008 16:12, Boyd, Todd M. advised: -Original Message- 8 snip! That's incorrect. A form will function perfectly well with only name= attributes, and no ids, and it's quite possible for JavaScript to address the form elements using only the names (in fact, it's easier

RE: [PHP] performance issues

2008-04-18 Thread Ford, Mike
On 17 April 2008 11:57, Bojan Tesanovic advised: in PHP5 by default Objects are passed by reference Please stop repeating this -- erm -- inexactitude. In PHP5, objects are passed around by their handle, *not* as a reference. Most of the time, this has the same effect, as you are addressing the

RE: [PHP] FRench characters not displayed correctly

2008-04-17 Thread Ford, Mike
On 17 April 2008 10:05, Robert Cummings advised: On Thu, 2008-04-17 at 10:57 +0200, Angelo Zanetti wrote: Thanks Robert, I have the following headers: http://fr..com/student/themes/english/locker_room/student.html GET /student/themes/english/locker_room/student.html? HTTP/1.1

RE: [PHP] $_SESSION problem [SOLVED (sort-of)]

2008-04-11 Thread Ford, Mike
On 11 April 2008 14:45, tedd advised: At 10:12 PM -0400 4/10/08, Eric Wood wrote: tedd wrote: [1] http://www.webbytedd.com/x/index.php [2] http://sperling.com/x/index.php Both of these demos have the exact same code; and are on the same server; with exactly the same php-info -- so, why

RE: [PHP] Array questions...

2008-03-06 Thread Ford, Mike
On 05 March 2008 15:50, Jason Pruim advised: On Mar 5, 2008, at 10:41 AM, Ford, Mike wrote: (I was also wondering to myself whether you actually really, really wanted $txtNumArray = $_POST['txtNumArray'], but perhaps you can easily explain why not...?) It's a habit I picked up when I

RE: [PHP] Array questions...

2008-03-05 Thread Ford, Mike
On 05 March 2008 15:34, Jason Pruim advised: Okay so I'm replying to my own post... And top posting to boot! :P Amazing what happens when you pull a few [] off for completness: $NumArray = Array($_POST['txtNumArray']); works as I wanted :) Are you sure?? Looks a bit suspect to me,

RE: [PHP] reverse string without strrev();

2008-02-28 Thread Ford, Mike
On 28 February 2008 12:39, Nathan Rixham advised: should it not use curlies? No, they will be deprecated as of PHP6. (Square brackets used to be, but have been undeprecated and are back in favour!) $tmp = ''; $str = 'abcdef'; for ($i = strlen($str)-1; $i = 0; $i--) { $tmp.= $str{$i};

RE: [PHP] string vs number

2008-02-06 Thread Ford, Mike
On 05 February 2008 21:37, Jochem Maas advised: the same is not exactly true for floats - although you can use them as array keys you'll notice in the output of code below that they are stripped of their decimal part (essentially a floor() seems to be performed on the float value. I have no

RE: [PHP] Can't find .php3 files

2008-01-09 Thread Ford, Mike
Chris wrote: I think you misunderstood. I have lots of file with things like require admin.php3 But there is no admin.php3 anywhere. There is however a file admin.php. Since this works on the old server then something on that system is translating a request for a .php3 file to

RE: [PHP] Can't find .php3 files

2008-01-09 Thread Ford, Mike
On 09 January 2008 12:18, Anup Shukla wrote: Jim wrote: Hi, Mike, The include is more like require ../admin/admin.php3 I don't know exactly how Apache performs its magic so I wasn't sure that the request for an include file would even pass through Apache's hands. In my limited

RE: [PHP] function I created doesn't work

2008-01-04 Thread Ford, Mike
On 04 January 2008 17:06, afan pasalic wrote: hi I have function function get_content($client_id, $form_id, $index1) { $query = mysql_query( SELECT content FROM infos WHERE client_id=.$client_id. AND

RE: [PHP] Sample script files with 3 different select boxes withmysql conditions in select boxes

2008-01-03 Thread Ford, Mike
On 03 January 2008 16:16, Wolf wrote: Børge Holen [EMAIL PROTECTED] wrote: On Thursday 03 January 2008 16:55:41 Robert Cummings wrote: On Thu, 2008-01-03 at 09:52 -0600, Jay Blanchard wrote: [snip] I don't suppose any of you punks know the meaning of rhetorical? ;) [/snip]

RE: [PHP] Seeking overlap algorithm

2007-12-07 Thread Ford, Mike
On 07 December 2007 02:14, tedd wrote: Now, what I need is a way to analyze the distribution of the current service providers to see if a given location is open to being sold as a preferred position -- do you see what I mean? Another example, let's say we have four preferred service

RE: [PHP] Generating sequence of AlphaNumber

2007-11-15 Thread Ford, Mike
On 15 November 2007 00:32, Jeffery Fernandez wrote: How can I get a sequence of values like: AX0001 AX0002 AX0003 AX0004 . AX0099 AX0100 and so on ? Actually, the ++ operator will do this for you: $seq = AX; ++$seq; // AX0001 ++$seq; // AX0002 Cheers! Mike

RE: [PHP] html parsing

2007-11-08 Thread Ford, Mike
On 08 November 2007 06:41, Ron Croonenberg wrote: ok I wrote something quick and dirty real quick: But somehow it doesn't seem to like recursion. Is there something special one needs to do in php ? Recursive functions work just fine in PHP. What's the error message? As far as I can see,

RE: [PHP] Benchmarking check to see if array key is set

2007-11-06 Thread Ford, Mike
On 06 November 2007 12:57, Christoph Boget wrote: Consider the following test code: [...snip...] Running that I found that if( isset( $myArray[$key] )) is faster than if( array key exists( $key, $myArray )) is faster than if( $myArray[$key] ) To be honest, I was surprised.

RE: [PHP] Stopping objects from auto-serializing

2007-10-31 Thread Ford, Mike
-Original Message- From: David Christopher Zentgraf [mailto:[EMAIL PROTECTED] Sent: 31 October 2007 08:04 To: PHP Subject: Re: [PHP] Stopping objects from auto-serializing After some more playing around and a lot of print_r($SESSION)'s: This specific PHP configuration seems

RE: [PHP] REGEX: grouping of alternative patterns

2007-10-30 Thread Ford, Mike
On 30 October 2007 11:07, Stijn Verholen wrote: Hey list, I'm having problems with grouped alternative patterns. The regex I would like to use, is the following: /\s*(`?.+`?)\s*int\s*(\(([0-9]+)\))?\s*(unsigned)?\s*(((auto_i ncrement)?\s*(primary\s*key)?)|((not\s*null)?\s*(default\s*(`.

RE: [PHP] Array problem

2007-10-17 Thread Ford, Mike
On 17 October 2007 12:09, Merlin wrote: Hi there, I am pulling picture ids out of a db and comment ids. The comments belong to the pic ids and are stored in two seperate tables. I am having trouble with the arrays to display them after pulling out of the db. The data is filled like

RE: [PHP] error messages

2007-10-05 Thread Ford, Mike
-Original Message- From: Paul Scott [mailto:[EMAIL PROTECTED] Sent: 05 October 2007 06:44 On Thu, 2007-10-04 at 22:38 -0700, tbt wrote: I'm a newbie to php and i would like to know a way of viewing runtime errors on the browser. Currently when an error occurs nothing is

RE: [PHP] highlighting searchterms as bold text

2007-09-20 Thread Ford, Mike
On 20 September 2007 11:34, Edward Kay wrote: Hi everyone, I want to highlight (bold) searchterms in text. For example, for all words starting with ethyl: a) replace ethyl by bethyl/b b) replace Ethyl by bEthyl/b c) replace ethylene by bethylene/b d) but not methyl by

RE: [PHP] Trying to understand sessions and using them to authenticate...

2007-08-29 Thread Ford, Mike
On 28 August 2007 15:56, Stut wrote: Jason Pruim wrote: One other question, to logout, can I just call a file that has session_destroy() and a header(Location: ???); in it? Or should I do something else for logging out? foreach (array_keys($_SESSION) as $key)

RE: [PHP] magic quotes

2007-08-09 Thread Ford, Mike
On 09 August 2007 14:44, David Giragosian wrote: On 8/9/07, Bastien Koert [EMAIL PROTECTED] wrote: you could use ini_set at the top of the script to turn the magic quotes off...if you add this in a prepend file or a common included file that sits at the top of the script, it should

RE: [PHP] Hidden include_path Fall Back?

2007-08-08 Thread Ford, Mike
On 08 August 2007 10:06, imacat wrote: Dear all, Hi. I'm new to this list. I searched the list archive and couldn't find an answer. I'm sorry if someone has asked before. I found that include_path seems to have a hidden fall back that's not documented anywhere. It seems to

RE: [PHP] OT A public apology to Larry Garfield

2007-08-07 Thread Ford, Mike
On 07 August 2007 16:15, Daniel Brown wrote: On 8/7/07, tedd [EMAIL PROTECTED] wrote: Hi gang: There should be a comma prior to the addressee(s). In the long winded debate over copyright infringement vs thievery, I made an unkind and untrue inference re Larry Garfield. You forgot to

RE: [PHP] Setting group sticky bit on directory with chmod()

2007-08-03 Thread Ford, Mike
Fax: +44 113 812 3211 On 8/2/07, Ford, Mike [EMAIL PROTECTED] wrote: On 02 August 2007 15:58, Daniel Brown wrote: On 8/2/07, Ben Ramsey [EMAIL PROTECTED] wrote: I'm trying to set a sticky bit on a directory with chmod(). The same octal value works from the command prompt

RE: [PHP] Setting group sticky bit on directory with chmod()

2007-08-02 Thread Ford, Mike
On 02 August 2007 15:58, Daniel Brown wrote: On 8/2/07, Ben Ramsey [EMAIL PROTECTED] wrote: I'm trying to set a sticky bit on a directory with chmod(). The same octal value works from the command prompt, but it doesn't appear to work correctly with the PHP function. Anyone have an idea as

RE: [PHP] Re: The Official OT Name Tedd's Grandson Thread

2007-07-26 Thread Ford, Mike
On 26 July 2007 16:10, M. Sokolewicz wrote: Daniel Brown wrote: On 7/26/07, Daniel Brown [EMAIL PROTECTED] wrote: or am I going retarded again? This has been confirmed. For whatever reason, Gmail isn't showing me the [PHP] mark in the subject for this thread. Perhaps

RE: [PHP] About DREAMWEAVER

2007-07-06 Thread Ford, Mike
On 05 July 2007 20:19, Dan Shirah wrote: There is a Find and Replace function in Dreamweaver, but it is very specific and will only find specific words/tags. Not at all true. Dreamweaver has a fully-functional regexp search in both Text and Source Code modes. Cheers! Mike

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... ?php $filter['flags'] = 0; if( $allow_fraction )

RE: [PHP] two php scripts with same $_SESSION variables

2007-05-24 Thread Ford, Mike
On 24 May 2007 13:22, Jean-Christophe Roux wrote: Hello, Thank you for the answers. The issue is that the same codes are in folders A and B. When they are run from two different browsers, I am getting the behavior I 'd like to see with two session ids being created and therefore no sharing

RE: [PHP] Re: session cookies enabled?

2007-05-10 Thread Ford, Mike
On 09 May 2007 16:36, [EMAIL PROTECTED] wrote: Ford, Mike writes: You can also set up php.ini and use the built-in sessions with http://php.net/session_start so that PHP will take care of this for you. That is what I was intending to do. How do I find out if whether

RE: [PHP] Re: session cookies enabled?

2007-05-09 Thread Ford, Mike
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 08 May 2007 20:57 You can also set up php.ini and use the built-in sessions with http://php.net/session_start so that PHP will take care of this for you. That is what I was intending to do. How do I

RE: [PHP] how to get var name and value from function?

2007-04-19 Thread Ford, Mike
On 19 April 2007 04:36, Richard Lynch wrote: On Wed, April 18, 2007 4:57 am, Ford, Mike wrote: On 17 April 2007 01:18, Richard Lynch wrote: Or is it explicitly stated in the manual somewhere I'm not seeing that one can put things in $GLOBALS directly? [shrug] http://uk2.php.net

RE: [PHP] how to get var name and value from function?

2007-04-18 Thread Ford, Mike
On 17 April 2007 01:18, Richard Lynch wrote: On Mon, April 16, 2007 12:10 pm, Ford, Mike wrote: No, not just another array (although I agree about the function being pretty useless!) -- $GLOBALS is a superglobal array that contains a reference to every variable defined in the global scope

RE: [PHP] how to get var name and value from function?

2007-04-16 Thread Ford, Mike
On 14 April 2007 13:16, Afan Pasalic wrote: Tijnema ! wrote: On 4/14/07, Afan Pasalic [EMAIL PROTECTED] wrote: function value2var($array, $print=0) { foreach ($_POST as $key = $value) I think you should change above line to : foreach ($array as $key = $value) yup!

RE: [PHP] how to get var name and value from function?

2007-04-16 Thread Ford, Mike
On 16 April 2007 16:18, Tijnema ! wrote: On 4/16/07, Ford, Mike [EMAIL PROTECTED] wrote: On 14 April 2007 13:16, Afan Pasalic wrote: Tijnema ! wrote: On 4/14/07, Afan Pasalic [EMAIL PROTECTED] wrote: function value2var($array, $print=0) { foreach ($_POST as $key

RE: [PHP] preview string with strlen PHP (help)

2007-03-27 Thread Ford, Mike
On 24 March 2007 16:28, tedd wrote: 2007. 03. 23, péntek keltezéssel 17.30-kor Dwayne Heronimo ezt írta: YES this works thank nemeth: your welcome but please call me Zoltán ;) (my first name is Zoltán. in Hungary we write names the opposite order than anywhere else ;) so that's why

RE: [PHP] Problem with MySQL

2007-03-20 Thread Ford, Mike
On 20 March 2007 13:26, Németh Zoltán wrote: 2007. 03. 20, kedd keltezéssel 15.09-kor Pavel Kaznarskiy ezt írta: Hello ! I have problem with access in mysql it is my code: html headtitleSQL Query Sender/title/head body ?php $host=; $user=; $password=; /* Section that

RE: [PHP] different and logic between PHP4 and PHP5

2007-03-15 Thread Ford, Mike
On 14 March 2007 01:00, Larry Garfield wrote: On Tuesday 13 March 2007 7:50 am, Vieri wrote: ?php //$b=3; $c=3; $a=($b and $c); echo A = .$a; in PHP4 I get: A = 0 and in PHP5 I get: A = I could call this lazyness on our part or code portability through PHP

RE: [PHP] different and logic between PHP4 and PHP5

2007-03-15 Thread Ford, Mike
On 12 March 2007 23:06, Richard Lynch wrote: On Mon, March 12, 2007 1:53 pm, Vieri wrote: The following code: ?php $b=; $c=df; $a=($b and $c); Why in the world would you use 'and' on two strings? What is that supposed to even mean?... Type-cast them to numbers if you want

RE: [PHP] Capitalizing the first letter

2007-03-15 Thread Ford, Mike
On 14 March 2007 08:25, Richard Lynch wrote: On Tue, March 13, 2007 9:10 am, Todd Cary wrote: I would like to write a filter that takes the text smith or SMith and returns Smith; same for ralph smith. No, you don't. :-) You *think* you want to write that function, but this is one of

RE: [PHP] 2 errors I can not understand

2007-03-15 Thread Ford, Mike
On 14 March 2007 22:52, Richard Lynch wrote: On Wed, March 14, 2007 6:52 am, Myron Turner wrote: Richard Lynch wrote: On Tue, March 13, 2007 6:04 pm, Jonathan Kahan wrote: The = operator takes precedence, and $d is set to 0. But why? According to the manual, the modulus operator

RE: [PHP] Array question

2007-02-27 Thread Ford, Mike
On 27 February 2007 04:23, Gerry D wrote: I have a question on how to retrieve the value that corresponds to a key in an array. $fruit = array('a' = 'apple', 'b' = 'banana', 'c' = 'cranberry'); $key = array_search($c, $fruit); if ( $key === FALSE )

RE: [PHP] sortind arrays

2007-01-25 Thread Ford, Mike
On 25 January 2007 10:55, Alexander Sagen wrote: Roman Neuhauser skrev: # [EMAIL PROTECTED] / 2007-01-25 08:12:14 +0200: How can I sort an array like this so that it would be ASC ordered by the [1] key in subarrays? I need to maintain only the subarray key - value pairs. (Do I make

RE: [PHP] PHP/Apache configuration failure

2007-01-11 Thread Ford, Mike
On 10 January 2007 16:28, Bruce A. Julseth wrote: I can't get Apache to restart after I've configured for PHP. I've upgraded my installation to 5.2. Now, Apache 2.2.3 runs fine without any PHP additions. [...] 4) I made the following changes to Httpd.conf After the last entry in the

RE: [PHP] Need help with RegEx

2006-12-12 Thread Ford, Mike
On 11 December 2006 19:43, Michael wrote: At 08:29 AM 12/11/2006 , Brad Fuller wrote: The example provided didn't work for me. It gave me the same string without anything modified. You are absolutely correct, this is what I get for not testing it explicitly :( My most sincere

RE: [PHP] odd behavior of stripos() with === operator *LAST POST*

2006-11-17 Thread Ford, Mike
On 17 November 2006 09:55, Michael wrote: This will be my last post on this thread of discussion. Thanks to all who replied, I have it figured out. I guess my only problem with the way the !== and === operators work in this situation is this: Logic dictates that if something evaluates

RE: [PHP] odd behavior of stripos() with === operator *LAST POST*

2006-11-17 Thread Ford, Mike
On 17 November 2006 16:50, Stut wrote: Your basic misunderstanding is that === is the opposite of !== which it's not. Complete rubbish -- it so absolutely is! If $a===$b, then !($a===$b) is the same as $a!==$b, QED. (INTEGER === true) will always be false because the types

RE: [PHP] php.ini and .htaccess not working for php parameters

2006-11-09 Thread Ford, Mike
On 08 November 2006 23:04, James Tu wrote: Sorry...it was my own sillyness. After confirming that the .htaccess file was indeed setting the include_path directory, it turns out that the class file was renamed and PHP could not find it. I'm surprised that PHP doesn't complain that it

RE: [PHP] alternatively

2006-10-02 Thread Ford, Mike
On 02 October 2006 15:20, Jochem Maas wrote: David Tulloh wrote: Ross wrote: How can I get this line to work $mail_body .= font size=\2\ face=\Verdana, Arial, Helvetica, sans-serif\ Title: $row['title'] /font; The $row['title'] variable is the problem. Drop the quotes

RE: [PHP] add functions to a class

2006-09-21 Thread Ford, Mike
On 21 September 2006 10:19, Thomas Munz wrote: This will not work. $this-bla(); This is a PHP Syntax and tries to get the Class method, PHP dont look for a variable name at all! It seams me strange also, that you try this, you should create the method for the class itself, or extend

RE: [PHP] register globals on

2006-09-12 Thread Ford, Mike
On 12 September 2006 08:18, Larry Garfield wrote: [...] In any vaguely recent version of PHP, you get five super-global array variables: $_GET - any parameters passed in the GET string. $_POST - any parameters passed in the body of a POST query. $_REQUEST - The two above merged. I

RE: [PHP] PHP5 Session length changed

2006-09-08 Thread Ford, Mike
-Original Message- From: Jens Kisters [mailto:[EMAIL PROTECTED] Sent: 08 September 2006 14:53 we validate all incoming parameters and that includes checking if the phpsession ID is only numbers and letters and is 32 Bytes long. This worked for some PHP5 Servers but we just

RE: [PHP] switch it button

2006-08-23 Thread Ford, Mike
On 23 August 2006 12:45, Ross wrote: At the moment I have this, but I want to change it to one switch button a href=?php echo $_SERVER['PHP_SELF'];??session_switch=1switch it/a. I have tried but keep getting wrapped up in nested if-else statements. Does anyone know how to make an

RE: [PHP] Re: Looking for caveats to the following code

2006-08-18 Thread Ford, Mike
On 17 August 2006 23:28, Adam Zey wrote: Better to do this: if ( ($result = do_something('hello')) !== false ) { // do something with $result } else { // do some other stuff } The result of an assignment like $result = do_something('hello') is itself the result you

RE: [PHP] The difference between ereg and preg?

2006-08-04 Thread Ford, Mike
On 04 August 2006 10:52, Dave M G wrote: Chris, Ligaya, Dave, Thank you for responding. I understand the difference in principle between ereg and preg much better now. Chris wrote: ! in perl regular expressions means not so you need to escape it: \! AFAIR, that's only true in the (?!

RE: [PHP] The difference between ereg and preg?

2006-08-04 Thread Ford, Mike
On 04 August 2006 11:30, Dave M G wrote: Jochem, Thank you for responding. does this one work?: preg_replace('#^\!DOCTYPE(.*)ul[^]*#is', '', $htmlPage); Yes, that works. I don't think I would have every figured that out on my own - it's certainly much more complicated than the

RE: [PHP] How do I prevent a session from rebuilding itself?

2006-07-13 Thread Ford, Mike
On 13 July 2006 00:20, Daevid Vincent wrote: Sequence of events: script starts you rm -rf /tmp/sess_* script writes out data script ends Exactly WHAT do you think should happen in this case?... I expect this to work like it USED TO WORK! Bug or not. I expect: Script starts

RE: [PHP] Silly varible question

2006-07-13 Thread Ford, Mike
On 13 July 2006 13:53, Ed Curtis wrote: I know this is probably simple as all get out but it's early and I can't find an answer anywhere after searching for a while I need to assign a number to a variable and then use that variable in a session to store an array. It's for a shopping

RE: [PHP] Where is phpinfo getting this?

2006-07-10 Thread Ford, Mike
On 10 July 2006 14:29, Robert Hicks wrote: I should have mentioned that in my first post. I did check the PHP.INI file and it is not in there (nor is there a mention of php5 in it). Robert Brad Bonkoski wrote: Check your include_path in your php.ini file. -Brad Robert Hicks

RE: [PHP] Multiple if() statements

2006-06-30 Thread Ford, Mike
On 30 June 2006 13:37, tedd wrote: At 11:07 PM -0600 6/29/06, John Meyer wrote: Larry Garfield wrote: switch is fine if your elseif comparisons are equality based. If they're not equality based, then they don't map to switch as well. In other words, if you look at a logical

RE: [PHP] Multiple if() statements

2006-06-29 Thread Ford, Mike
On 29 June 2006 01:03, David Tulloh wrote: I'm also going to throw in an elseif for fun, to get this (hopefully) improved version: if($row[1] == none) { print(tr); print(td$row[0] $row[2]/td); print(/tr); } elseif($row[1] == $row[2]) { print(tr); print(td$row[0]

RE: [PHP] Fatal error: Call to a member function query() on a non-object in C:\Xampp\xa...

2006-06-28 Thread Ford, Mike
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 28 June 2006 10:10 Fatal error: Call to a member function query() on a non-object in C:\Xampp\xampp\htdocs\www2\knowledge_db\searchnew.php on line 81 Even though the $connection has already been

RE: [PHP] sort multidimension array

2006-06-22 Thread Ford, Mike
On 22 June 2006 02:22, weetat wrote: Hi all, I have multi-arrays as shown below: I implemented usort() to sort the array by 'country' field in the array. However there some empty string value in the array and i setup my cmpcountry() function to sort array, however , some country

RE: [PHP] Help with some clever bit operations

2006-06-13 Thread Ford, Mike
On 13 June 2006 10:31, Niels wrote: Hi, I have a problem I can solve with some loops and if-thens, but I'm sure it can be done with bit operations -- that would be prettier. I've tried to work it out on paper, but I keep missing the final solution. Maybe I'm missing something obvious...

RE: [PHP] Re: order of elements in $_POST super global

2006-06-09 Thread Ford, Mike
On 08 June 2006 16:20, Ben Liu wrote: I probably should add some more details to my question: The names of the form checkboxes could be changed from ie: bool_careers, bool_speaking, bool_internship, etc. to a single array bool_questions[], for instance. The problem with that is that I am

RE: [PHP] binary zero evaluates as true!?

2006-06-09 Thread Ford, Mike
On 09 June 2006 04:11, D. Dante Lorenso wrote: Jon wrote: The second thing that needs to be said here is simply a re-statement of the original, this time more verbosely. The list of things in php that evaluate as false is as follows: * the boolean FALSE itself * the integer 0

[PHP] RE: order of elements in $_POST super global

2006-06-09 Thread Ford, Mike
On 09 June 2006 13:55, Mindaugas L wrote: Hello, The basic problem is that the way a $_POST variable gets processed is in the order it is in on the original form. I think it's very natural behaviour. But be careful with associative arrays, I think before version 5.12.there was a bug,

RE: [PHP] When is z != z ?

2006-06-06 Thread Ford, Mike
On 06 June 2006 02:35, tedd wrote: a b c ... x y z aa ab ac ... yx yy yz za zb zc ... zy zx zz aaa aab -- it's not! Yes it is. The ++ operator generates that sequence when applied to a string, and nothing you can say or do will alter that fact. You're trying to treat the 2nd and 3rd

<    1   2   3   4   5   6   7   8   9   10   >