Re: [PHP] help - WHILE in FOREACH

2003-01-07 Thread James Brennan
:49:53 -0800 (PST) On Tue, 7 Jan 2003, James Brennan wrote: > The while statement is only executing correctly for the first run through > the foreach loop. Why? It's /real/ hard to tell when you don't give any context or otherwise explain what it is you want to achieve. Since the

Re: [PHP] help - WHILE in FOREACH

2003-01-07 Thread James Brennan
The second set of quotes is actualy two single quotes with nothing in-between. .loop From: "Rick Emery" <[EMAIL PROTECTED]> Reply-To: "Rick Emery" <[EMAIL PROTECTED]> To: "James Brennan" <[EMAIL PROTECTED]>,<[EMAIL PROTECTED]> Subject: Re:

[PHP] help - WHILE in FOREACH

2003-01-07 Thread James Brennan
The while statement is only executing correctly for the first run through the foreach loop. Why? Thanks, loop foreach($desc as $key=>$value) { printf("Show %s Description ", $key, $key); echo ""; while($row = mysql_fetch_row($show_names)) { printf("%s", $row[0], $row[1]);

[PHP] .doc parsing class or function?

2003-01-05 Thread James Brennan
I'm looking to extract the text from user-uploaded .doc files. Has anyone come across a class or function for this? If not, any advice on where I would go to figure out how to write one of my own? thanks, loop _ STOP MORE SPAM wi

[PHP] ascii(10) changed to ascii(13) when uploading

2002-12-30 Thread James Brennan
Just a heads-up. I was having problems doing a MySql infile insert with a flat file uploaded from an html form. I discovered that ascii character 10 (new line \n,\r) is being changed to ascii character 13 (charriage return) when it is uploaded. MySql didn't recognize the ascii-13 character as a

[PHP] weird MySQL resource error

2002-12-28 Thread James Brennan
I am getting a "Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource" error only when the commented-out code bellow (starting from $id = bb_sponsor...) is added. If I omit the code the resource is recognized as valid. Can anyone explain? Thanks, loop P.S. - I know

[PHP] dropping the resource fork

2002-12-22 Thread James Brennan
It's a new day and I'm still trying to figure my flat-text database update problem out. I am uploading from mac to unix . Does a .txt file have a resource fork? Is the resource fork from the mac file automatically scraped by unix, or do I have to do that? Would it be efficient to strip the reso

Re: [PHP] un-solved - uploading flat text to MySQL -

2002-12-21 Thread James Brennan
part/form-data" solved the problem. :) loop From: "James Brennan" <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Subject: [PHP] uploading flat text to MySQL Date: Sun, 22 Dec 2002 01:04:14 -0500 I'm using a HTML form to submit flat text files to a MySQL database. When I up

Re: [PHP] solved - uploading flat text to MySQL -

2002-12-21 Thread James Brennan
Changing ENCTYPE to "text/plain" from "multipart/form-data" solved the problem. :) loop From: "James Brennan" <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Subject: [PHP] uploading flat text to MySQL Date: Sun, 22 Dec 2002 01:04:14 -0500 I'm using a HTML

[PHP] uploading flat text to MySQL

2002-12-21 Thread James Brennan
I'm using a HTML form to submit flat text files to a MySQL database. When I upload the text file by FTP the script that loads it's contents into the database works as expected. When I upload using the HTML form it seems to ignore the new line in the text file. As a result it only creates one row

[PHP] nested if in a for statement

2002-12-17 Thread James Brennan
I am checking the values of a submited forms for empty fields with the code below. My problem is that the echo statement is being executed once regardless of whether or not the if statement is true. What am I missing? thanks, loopjunkie snip /* variables in array set earlier in script