[PHP] Re: MySQL errors in newer PHP 4.2.3

2002-09-19 Thread Zak Greant
Hello Jocelyn and Steven, Could either or both of you submit a bug report at http://bugs.php.net/? If you follow the instructions there, it will greatly help us in tracking down the issue! Cheers! Zak Greant PHP QA Team -- PHP General Mailing List (http://www.php.net/) To unsubscribe

Re: [PHP] unless something...

2002-09-12 Thread Zak Greant
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On September 12, 2002 09:47, Magnus Solvang wrote: > I'm used to the unless-statement in perl... How do I do this: > > if string A or B are NOT in string C, then do something and quit. > > In perl, I would do this: > > unless ($c =~ /$a|$b/) { > b

Re: [PHP] Query result to an array

2002-09-11 Thread Zak Greant
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On September 12, 2002 01:55, Christian Ista wrote: > > $result = mysql_query(...); > > while( $t = mysql_fetch_row($result) ){ > > $array[] = $t; > > } > > No. I need a 2 dimensions arrays, each line of this array, is the result > of one row

Re: [PHP] Query result to an array

2002-09-11 Thread Zak Greant
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On September 12, 2002 00:56, Christian Ista wrote: > > array( > > array( $temp[0], $temp[1] ), > > array( $temp[1], $temp[2] ) > > ) > > I thinks it's not the right way. > > I have a query, this query can return 1,5,20, 200, ... rows, each

Re: [PHP] Extracting Numbers from a string.

2002-09-11 Thread Zak Greant
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On September 11, 2002 16:31, Jason Caldwell wrote: > I need to extract the numbers only from a field. > > For example: I have an AMOUNT field and so that I can filter out any user > typo's I would like to extract the numbers only. > > If the user ent

Re: [PHP] Will return break loop?

2002-09-11 Thread Zak Greant
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On September 11, 2002 15:57, Kevin Stone wrote: > Really quick question. Will "return" break a loop inside a function? > > Example.. > myfunc() > { > while($val=0) > { > if ($i=128) > { > return true; //<-break or

Re: [PHP] Query result to an array

2002-09-11 Thread Zak Greant
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On September 11, 2002 15:21, Christian Ista wrote: > > while( $temp = mysql_fetch_row($mysql_result_handle) ) { > > $array[] = array( > > 'key0' => array( > > 'keya' => $temp[0], > > 'keyb' => $t

Re: [PHP] Query result to an array

2002-09-11 Thread Zak Greant
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On September 11, 2002 15:05, Christian Ista wrote: > > while( $temp = mysql_fetch_row($mysql_result_handle) ) { > > $array[] = array( > > 'key0' = array( > > 'keya' => $temp[0], > > 'keyb' => $te

Re: [PHP] ucwords()? and åäö

2002-09-11 Thread Zak Greant
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Here is a quick replacement script* for ucwords() that can be made to handle accented characters or interesting casing rules. It is a bit uppercase happy - - uppercasing any letter that comes after a non-letter character. *(Taken from the PHP Funct

Re: [PHP] Displaying value different from actual value

2002-09-11 Thread Zak Greant
---+ | contract | amount | +--+-+ | Jillco | 100 | | Jackco | 1 | | ChrisInc |NULL | +--+-+ The the following select: SELECT contract, IFNULL(amount, "Fee Based") amount FROM contracts; will return: Jillco

Re: [PHP] Query result to an array

2002-09-11 Thread Zak Greant
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On September 11, 2002 14:12, Christian Ista wrote: > Hello, > > A query return x rows, by rows there are 4 fields. I'd like to put the > result in an array, a 2 dimensions array. Could you tell me how to do > that ? Something like this may work for

Re: [PHP] Confusing array question ...

2002-09-10 Thread Zak Greant
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hey John, Actually, you don't seem to far off. You can use a string as a variable name by enclosing the string in ${ }. i.e: ${"foo"} You should be able to write your loop as something like: foreach($item as $value) { // do some stuff

Re: [PHP] combine 2 integer

2002-09-09 Thread Zak Greant
On September 9, 2002 03:38, Meltem Demirkus wrote: > Hi, > > I want to add one integer to the end of another , which function can I > use?.. Hi Meltem, You can use the concatenation operator (.) Cheers! --zak -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: ht

Re: [PHP] Why?

2002-03-24 Thread Zak Greant
On March 31, 2002 04:39, Alberto Wagner wrote: > Why everyone uses $foo or $foobar as examples? http://foldoc.doc.ic.ac.uk/foldoc/foldoc.cgi?query=foo --zak -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: [PHP-DEV] Resume of my problem

2002-03-24 Thread Zak Greant
On March 25, 2002 01:50, you wrote: > HI, > > I have a functino write in c, like as: > > void addvalue ( int a, int b, int *c ) > { > *c = a + b; > } > >in php > > > phpinclude ("alexlib"); > addvalue ( 1, 2, c ); > print ( "Value c = $c "); > > ?> > > what the procedu

RE: [PHP] Multiple Forms

2002-03-03 Thread Zak Greant
On Sun, 2002-03-03 at 20:31, Martin Towell wrote: > 1) not unless you have them opening up a new window for each form > 2) combine them into one form Also, this topic is covered quite often on this list. Check the list archives for the various solutions people have used. http://php.net/sup

[PHP] eWeek Poll: Which database is most critical to your organization?

2002-02-26 Thread Zak Greant
-zak -- __ ___ ___ __ / |/ /_ __/ __/ __ \/ / Zak Greant <[EMAIL PROTECTED]> / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Advocate /_/ /_/\_, /___/\___\_\___/ Calgary, Canada <___/ www.mysql.com 403.244.7213 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http:

Re: [PHP] count number of email sent to us

2001-07-18 Thread Zak Greant
Both topics are covered frequently :) --zak Jack wrote: > Sorry, It is mistyping here. I mean, we normally use variables from php to > do something in javascript function. But how could we use value from > variables in javascript function to do something in php function? -- PHP General Maili

Re: [PHP] count number of email sent to us

2001-07-18 Thread Zak Greant
Check the list archives - this question gets posed quite often. --zak - Original Message - From: "Jack" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Wednesday, July 18, 2001 1:38 PM Subject: Re: [PHP] count number of email sent to us > Yes, that is the point here. We normally use

Re: [PHP] PHP and XHTML

2001-07-17 Thread Zak Greant
Hi Daniel, Set short_open_tag = Off in your php.ini file and the problem will go away. --zak Rose, Daniel wrote: > Hi, > I have looked through the history of the list, and I see that several people > have said that PHP fully supports XHTML. I have some problems using XHTML > with PHP, namely pa

Re: [PHP] explode()

2001-07-16 Thread Zak Greant
list (,$reqmonth) = explode ('-', $row[5]); --zak - Original Message - From: "Adam Plocher" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, July 16, 2001 5:23 PM Subject: [PHP] explode() > $reqmonth = ${explode("-",$row[5])}[1]; > > Is there anyway I can get that to work with

Re: [PHP] Credit card number checker?

2001-07-16 Thread Zak Greant
Christopher Ostmo wrote: > Dr. Evil pressed the little lettered thingies in this order... > > > > > I know that credit cards have standard formats: There's a standard > > number of digits, and whether the card is Visa, MC, Amex, etc is > > encoded in the number, and there is some kind of checksum,

Re: [PHP] Variable name declarations?

2001-07-13 Thread Zak Greant
Hi Matthew, Set your error_reporting level to E_ALL. The parser will then report the use of undeclared variables. --zak - Original Message - From: "Matthew Aznoe" <[EMAIL PROTECTED]> To: "php" <[EMAIL PROTECTED]> Sent: Friday, July 13, 2001 2:22 PM Subject: [PHP] Variable name declarat

Re: [PHP] Next Book

2001-07-08 Thread Zak Greant
Rick wrote: [...] > I'd be interested in some good PHP books as well, I feel like I'm in a rut. > At first, PHP was all new, and I was learning s much... but now if I > think up a task I can visualize how to do it in PHP pretty easily. I know I > have a LOT to learn, but I think my problem is

Re: [PHP] High Ascii chars

2001-07-07 Thread Zak Greant
rm wrote: > php3.x > > We have a large number of people submitting a large > number of docs...I'm having a problem with some docs > coming through with high ascii characters in the text, > apparently the dbm database we're using chokes on some > high ascii chars. I need to eliminate characters i

Re: [PHP] error_log not obeyed

2001-07-03 Thread Zak Greant
Arcady Genkin wrote: > [message format fixed] > "..s.c.o.t.t.." <[EMAIL PROTECTED]> writes: > > > > I'm trying to send PHP errors into a separate log file. I have the > > > following in php.ini: > > > > > > log_errors = On > > > error_log = /var/www/logs/php-errors.log > > > > > > After apach

Re: [PHP] Enter to BR

2001-06-26 Thread Zak Greant
Use nl2br() --zak - Original Message - From: "Joeri Vankelst" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, June 25, 2001 4:16 PM Subject: [PHP] Enter to BR > How can I get an Enter typed in a HTML textfield to be inerpreted as a BR or > a P tag? > Someone sugested I use th

Re: [PHP] explode

2001-06-24 Thread Zak Greant
Richard Kurth wrote: > > Question about explode > > this work just perfect >$name="what+ever"; > > $name1=explode("+",$name); > $fname=$name1[0] ;this has what > $lname=$name1[0] ;this has ever > > But if I pass the info from another page like this > > test > > $n

Re: [PHP] converting Word documents to something sensible

2001-06-24 Thread Zak Greant
Hi Phil, There are a few options that may meet your needs: Word2x (http://word2x.alcom.co.uk/) LAOLA (http://user.cs.tu-berlin.de/~schwartz/pmh/) Good Luck!! --zak - Original Message - From: "Phil Driscoll" <[EMAIL PROTECTED]> To: "Justin Farnsworth" <[EMAIL PROTECTED]> Cc: "p

Re: [PHP] newbie algorithm help!!!!!

2001-06-23 Thread Zak Greant
McShen wrote: > > hi > > i have a mysql table with approx. 30 entries. > > > > I wanna get them(i know how to do that) and list them in a 2-column table. > I > > have been trying to use a loop to do it. But it will only produce a > 1-column > > table. it's like > > > > entry 1 > > entey 2 > > entr

Re: [PHP] math question

2001-06-23 Thread Zak Greant
Have you defined the 'pi' constant? If you are trying to use PHP's built-in PI constant, it is named 'M_PI' Perhaps consider increasing your error reporting level so that PHP reports problems like undefined constants - see error_reporting() for more details. --zak - Original Message -

Re: [PHP] REG_EMPTY error

2001-06-23 Thread Zak Greant
This error means that you are using an empty string as your pattern for the regular expression. Throw a test like this in before the eregi_replace calls to check if this is the case: if ('' === $r[1]) { echo '$r[1] is an empty string'; } else if (NULL === $r[1]) { echo '$r[1] is NULL'; }

Re: [PHP] passing arrays

2001-06-23 Thread Zak Greant
Jason Jacobs wrote: > Hi all. I'm trying to pass an array to another page, and I'm not having > luck. I thought maybe it would do something slick by passing it in the > url, but it doesn't. So, how can I pass the array? You can pass an array between pages by using the serialize() and u

Re: [PHP] Parse PHP inside a variable

2001-06-21 Thread Zak Greant
Write your code to a temporary file, include the file and then delete it. "; // Create a temporary file to store the code $file = tempnam ('/tmp', 'eval'); error_log ($code, 3, $file); // include the temp file include ($file); // erase the temp file unlink ($file); ?> /* Note - I have not tes

Re: [PHP] email templates and str_replace

2001-06-20 Thread Zak Greant
Hi Richard, You are replacing the placeholders in $mail_template, but you are storing the results in $mail_content. > $mail_content = str_replace('##fullname##',$fullname,$mail_template); > $mail_content = str_replace('##email##',$email,$mail_template); This means that each time you call the st

Re: [PHP] PHP AND SSI

2001-05-23 Thread Zak Greant
Use PHP's include() function. See the online manual for details. --zak - Original Message - From: "Shashwat" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, May 23, 2001 4:07 AM Subject: [PHP] PHP AND SSI > How can I run SSI commands like etc. in PHP > files... as ASP

Re: [PHP] cookies

2001-05-22 Thread Zak Greant
Hi Jon, Dealing with expiry dates and cookies is often a PITA! Rasmus suggested a way around this a few weeks ago - here is a rehash of what he said: Do this: setcookie ('expiry', time ()); This call will have created a session cookie - this means that the session will expire when the browser

Re: [PHP] All of a sudden I get Warning: Bad arguments to implode() in busca_01.php on line 133

2001-05-22 Thread Zak Greant
> ie. Oops! Hit the right keys at the wrong time! :) if (! count ($array_id)) { echo '$array_id is empty or not set.'; } else if (1 == count($array_id)) { $string_id=$array_id; } else { $string_id= implode(":",$array_id); } --zak -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] All of a sudden I get Warning: Bad arguments to implode() in busca_01.php on line 133

2001-05-22 Thread Zak Greant
Sounds like you are trying to implode a non-existant array. Change your code to handle an empty or missing array. ie. - Original Message - From: "Martin Cabrera Diaubalick" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, May 22, 2001 2:41 AM Subject: [PHP] All of a sudden I

Re: [PHP] returned eMails

2001-05-22 Thread Zak Greant
Read the entry on the mail function in the manual: http://www.php.net/manual/fr/function.mail.php --zak - Original Message - From: "Jean-Arthur Silve" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, May 22, 2001 2:26 AM Subject: [PHP] returned eMails Hi ! We have a site whi

Re: [PHP] ftp_put

2001-05-22 Thread Zak Greant
Ensure that the user that PHP is running as has permissions to read the file. --zak - Original Message - From: "Jon A" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, May 21, 2001 10:36 AM Subject: [PHP] ftp_put > Hi, all. > > I try to do a file upload using the ftp_put funct

Re: [PHP] Re: [PHP-DEV] Fork() in php?

2001-05-20 Thread Zak Greant
Manuel wrote: [...] > Since Zeev and Andi seem to be currently the most capable developers to bring > multi-threading capability to PHP because they developed PHP current engine > - Zend, my question still goes for them. After all they always seemed more > reasonable and opened to my suggestions

Re: [PHP] Problem using unpack

2001-05-20 Thread Zak Greant
$playerdata = unpack('czero/A'.$length.'one/itwo/fthree/A*four', $rest); Good Luck! --Zak - Original Message - From: "Craig Vincent" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, May 20, 2001 4:00 AM Subject: [PHP] Problem using unpack > I'm current trying to use PHP's unp

Re: [PHP] Finding if a number is in the range

2001-05-17 Thread Zak Greant
MaD dUCK wrote: > also sprach Zak Greant (on Thu, 17 May 2001 09:35:18PM -0600): > > Or just use a simple chain of if statements :) > > yeah, but that's so O(n) ! > i can do in O(lg n) > or, given n CREW processors, in O(1) time! > > yes, i have just fini

Re: [PHP] Finding if a number is in the range

2001-05-17 Thread Zak Greant
Or just use a simple chain of if statements :) if ($num >= 200 && $num <= 299) { echo "$num is between 200 and 299"; } else if ($num >=1000 && $num <= 2263) { echo "$num is between 1000 and 2263"; } else if ($num >=2264 && $num <= 2499) { echo "$num is between 2264 and 2499"; } else {

Re: [PHP] Making sure a class is declared only once

2001-05-12 Thread Zak Greant
class_exists() --zak - Original Message - From: "rodrigo" <[EMAIL PROTECTED]> To: "php php" <[EMAIL PROTECTED]> Sent: Saturday, May 12, 2001 7:56 PM Subject: [PHP] Making sure a class is declared only once > Someone on the list mentioned a way to check if a classed is already > declar

Re: [PHP] Mysql sequence help (OOT)

2001-05-10 Thread Zak Greant
Use an auto_increment field. ie. create table foo ( id mediumint unsigned not null auto_increment primary key, namechar (16) not null, ... ) --zak - Original Message - From: "Reuben D Budiardja" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, May 10,

Re: [PHP] Binary Data File reading

2001-05-10 Thread Zak Greant
Try using unpack() --zak - Original Message - From: "Chris Mattmann" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, May 10, 2001 2:54 PM Subject: [PHP] Binary Data File reading > Hi there- > > Does anyone have any clue as to what may be causing this problem. I am

Re: [PHP] How to read a web page and analyze but not display it

2001-05-08 Thread Zak Greant
Use fopen() or file() --zak - Original Message - From: "Dexter" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, May 08, 2001 4:27 PM Subject: [PHP] How to read a web page and analyze but not display it hi PHP 'sters, How to read a web page and analyze but not display it u

Re: [PHP] Refreshing multiple frames?

2001-05-07 Thread Zak Greant
You are going to need Javascript to do this. --zak - Original Message - From: "Brandon Orther" <[EMAIL PROTECTED]> To: "PHP User Group" <[EMAIL PROTECTED]> Sent: Monday, May 07, 2001 5:19 PM Subject: [PHP] Refreshing multiple frames? > Hello, > > I am using php with frames for a menu

Re: [PHP] Converting a binary integer to a number

2001-05-07 Thread Zak Greant
Use unpack(): // Grab as many signed 32-bit integers as possible $array = unpack ('l*', $data); --zak - Original Message - From: "Siegfried Kettlitz" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, May 07, 2001 12:36 PM Subject: [PHP] Converting a binary integer to a number

Re: [PHP] HTTP_RAW_POST_DATA

2001-05-07 Thread Zak Greant
1 7:15 AM Subject: Re: [PHP] HTTP_RAW_POST_DATA > Zak, > > Thank you for the answer. Are you sure $HTTP_POST_VARS will be still set after > that modification in case of a valid x-www-form-urlencoded POST request? I'm > afraid they won't.. Such side effect is very undesirable for me. >

Re: [PHP] HTTP_RAW_POST_DATA

2001-05-07 Thread Zak Greant
Dmitri Zasypkin wrote: > Hi, > > Could anyone help me with altering PHP sources? Or tell me please where > may I ask this question? > > The problem is when PHP handles a POST request of a known Content-type > (e.g. x-www-form-urlencoded), it leaves $HTTP_RAW_POST_DATA blank. I > need to alter the

Re: [PHP] Decoding .txt attachments

2001-05-06 Thread Zak Greant
The file is likely uuencoded, AFAIK PHP does not have a built-in function to handle this. IIRC there is a function on http://px.sklar.com/ that does this. --zak - Original Message - From: "~~~i LeoNid ~~" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, May 07, 2001 12:06 AM Su

Re: [PHP] files

2001-05-06 Thread Zak Greant
Change the permissions of the /etc/passwd file, use safe mode or suExec --zak - Original Message - From: "php" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, May 06, 2001 11:14 PM Subject: [PHP] files > > Good day to you all > > How can I keep php scripts from reading th

Re: [PHP] IIS instead of PWS!!! what else can i do..

2001-05-06 Thread Zak Greant
IIRC, it can with some caveats - check the library at xitami.com --zak - Original Message - From: "Thomas Edison Jr." <[EMAIL PROTECTED]> To: "Zak Greant" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Sunday, May 06, 2001 1:05 AM Subject: Re:

Re: [PHP] IIS instead of PWS!!! what else can i do..

2001-05-05 Thread Zak Greant
You may want to try Xitami (www.imatix.com) as a fast/free/open source alternative to the Microsoft products. --zak - Original Message - From: "Thomas Edison Jr." <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, May 06, 2001 12:52 AM Subject: [PHP] IIS instead of PWS!!! what el

Re: [PHP] PHP using Forms

2001-05-04 Thread Zak Greant
Use the nl2br() function --zak - Original Message - From: "Mike Mike" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, May 04, 2001 8:11 AM Subject: [PHP] PHP using Forms > Hello, > I have a form field COLS=40> > with this data in it: > > My Home > 11 North 5th St > St. P

Re: [PHP] Split Weirdness.

2001-04-30 Thread Zak Greant
Nick Davies wrote: > Why does this work : > > $categorySplit = split(",", $row['category']); > > while (list($key, $value) = each ( $categorySplit )) { > $categoryArray["$value"] = 1; > } > > But this not : > > while (list($key, $value) = each ( split(",", $row['category']) )) { > $categoryArray[

Re: [PHP] Strange Question - Please Read This

2001-04-27 Thread Zak Greant
Set the auto_append_file or auto_prepend_file in the php.ini file. See http://www.php.net/manual/en/configuration.php for more details --zak - Original Message - From: "Chris Anderson" <[EMAIL PROTECTED]> To: "PHP" <[EMAIL PROTECTED]> Sent: Friday, April 27, 2001 11:50 AM Subject: [PHP]

[PHP-CVS] Change of address

2001-04-25 Thread Zak Greant
Hello All, Could someone with the needed karma please change my email address in the cvsusers file from [EMAIL PROTECTED] to [EMAIL PROTECTED] Thank you! --zak -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROT

[PHP] Re: [PHP-QA] Error in www.php.net (To site admin)

2001-03-08 Thread Zak Greant
Are you still encountering the error? I don't see it. --zak - Original Message - From: "Yasuo Ohgaki" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Wednesday, March 07, 2001 8:06 PM Subject: [PHP-QA] Error in www.php.net (To site admin) > There is a error on w