php-general Digest 5 Jun 2007 10:38:19 -0000 Issue 4830

2007-06-05 Thread php-general-digest-help
php-general Digest 5 Jun 2007 10:38:19 - Issue 4830 Topics (messages 256057 through 256077): Re: Removing a row from an Array 256057 by: Jay Blanchard 256058 by: Peter Lauri 256059 by: Roberto Mansfield 256060 by: Ken Kixmoeller -- reply to ken.kixmoeller.com

[PHP] Re: Printing MSSQL-Query ERROR description in PHP

2007-06-05 Thread Darren Whitlen
karthi keyan wrote: Hi, Is there any way to print the reason why the query has been failed, like the way MySQL-PHP has mysql_error()? Regards, KARTHIK. - Download prohibited? No problem! CHAT from any browser, without download. I'm

Re: [PHP] Re: Printing MSSQL-Query ERROR description in PHP

2007-06-05 Thread Zoltán Németh
2007. 06. 5, kedd keltezéssel 11.38-kor Darren Whitlen ezt írta: karthi keyan wrote: Hi, Is there any way to print the reason why the query has been failed, like the way MySQL-PHP has mysql_error()? Regards, KARTHIK. -

Re: [PHP] Re: Printing MSSQL-Query ERROR description in PHP

2007-06-05 Thread Darren Whitlen
Zoltán Németh wrote: 2007. 06. 5, kedd keltezéssel 11.38-kor Darren Whitlen ezt írta: karthi keyan wrote: Hi, Is there any way to print the reason why the query has been failed, like the way MySQL-PHP has mysql_error()? Regards, KARTHIK. -

Re: [PHP] Re: Printing MSSQL-Query ERROR description in PHP

2007-06-05 Thread Zoltán Németh
2007. 06. 5, kedd keltezéssel 11.50-kor Darren Whitlen ezt írta: Zoltán Németh wrote: 2007. 06. 5, kedd keltezéssel 11.38-kor Darren Whitlen ezt írta: karthi keyan wrote: Hi, Is there any way to print the reason why the query has been failed, like the way MySQL-PHP has

Re: [PHP] Re: Printing MSSQL-Query ERROR description in PHP

2007-06-05 Thread Darren Whitlen
look at the subject ;) that's how I guessed what he wants Woops, missed that. You have a good point there :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] TableName with space

2007-06-05 Thread Miles Thompson
On 6/5/07, karthi keyan [EMAIL PROTECTED] wrote: Hi, How can I create a table with spaces Order details in MSSQL using PHP? I am able to create manually the table name with space by providing the name in Double Quotes. Is there a way out to do this using PHP? Thanks Karthik. Why

Re: [PHP] Re: Removing a row from an Array

2007-06-05 Thread Al
I miss keyed, it's preg_grep(). Had array on my mind. M. Sokolewicz wrote: I've never heard of, nor seen array_grep() before and AFAIK it's also not a built-in php function. Check it at http://www.php.net/array_grep, it doesn't exist. No need to advise that which does not exist :) - Tul Al

Re: [PHP] TableName with space

2007-06-05 Thread karthi keyan
Hi, Double qoutes inside a PHP script is not working for spaces. I got the answer. We have to use square bracket from PHP. $query = create table [order details]; Chris [EMAIL PROTECTED] wrote: karthi keyan wrote: Hi, How can I create a table with spaces Order details in

Re: [PHP] Making thumbs same size

2007-06-05 Thread tedd
At 9:56 AM -0400 6/4/07, Robert Cummings wrote: On Mon, 2007-06-04 at 09:50 -0400, tedd wrote: Don't scale, resample. See here: http://www.webbytedd.com/b/thumb/index.php Hi Tedd, In your script you have: ini_set( 'register_globals', '0' ); The line is pointless, it can't be

Re: [PHP] Making thumbs same size

2007-06-05 Thread Robert Cummings
On Tue, 2007-06-05 at 09:17 -0400, tedd wrote: At 9:56 AM -0400 6/4/07, Robert Cummings wrote: I didn't do that. No one saw me do it and can't prove it. Besides, I changed the code. :-) My explanation, legacy remnants. I can relate. I've worked on code, changed my mind, ripped out 80% of

Re: [PHP] Making thumbs same size

2007-06-05 Thread Zoltán Németh
2007. 06. 5, kedd keltezéssel 09.17-kor tedd ezt írta: At 9:56 AM -0400 6/4/07, Robert Cummings wrote: On Mon, 2007-06-04 at 09:50 -0400, tedd wrote: Don't scale, resample. See here: http://www.webbytedd.com/b/thumb/index.php Hi Tedd, In your script you have: ini_set(

Re: [PHP] uploading big images.

2007-06-05 Thread Stut
Yamil Ortega wrote: I think it is a PHP.ini file configuration or something. Can you help me? So why not check there before posting here? I mean seriously, the option couldn't be more obvious considering that it's called upload_max_filesize. -Stut -- PHP General Mailing List

Re: [PHP] Making thumbs same size

2007-06-05 Thread tedd
At 3:33 PM +0200 6/5/07, Zoltán Németh wrote: 2007. 06. 5, kedd keltezéssel 09.17-kor tedd ezt írta: At 9:56 AM -0400 6/4/07, Robert Cummings wrote: On Mon, 2007-06-04 at 09:50 -0400, tedd wrote: Don't scale, resample. See here: http://www.webbytedd.com/b/thumb/index.php PS:

Re: [PHP] Printing MSSQL-Query ERROR description in PHP

2007-06-05 Thread Jim Lucas
karthi keyan wrote: Hi, Is there any way to print the reason why the query has been failed, like the way MySQL-PHP has mysql_error()? Regards, KARTHIK. - Download prohibited? No problem! CHAT from any browser, without download. Is this

Re: [PHP] Printing MSSQL-Query ERROR description in PHP

2007-06-05 Thread Stut
karthi keyan wrote: Is there any way to print the reason why the query has been failed, like the way MySQL-PHP has mysql_error()? Hmm, where to look for information on the MSSQL functions in PHP. Hey, I got a crazy plan. Let's try looking in the MSSQL part of the PHP manual. Come navigate

Re: [PHP] Making thumbs same size

2007-06-05 Thread Robert Cummings
On Tue, 2007-06-05 at 10:17 -0400, tedd wrote: At 3:33 PM +0200 6/5/07, Zoltán Németh wrote: 2007. 06. 5, kedd keltezéssel 09.17-kor tedd ezt írta: At 9:56 AM -0400 6/4/07, Robert Cummings wrote: On Mon, 2007-06-04 at 09:50 -0400, tedd wrote: Don't scale, resample. See here:

Re: [PHP] Making thumbs same size

2007-06-05 Thread Zoltán Németh
2007. 06. 5, kedd keltezéssel 10.17-kor tedd ezt írta: At 3:33 PM +0200 6/5/07, Zoltán Németh wrote: 2007. 06. 5, kedd keltezéssel 09.17-kor tedd ezt írta: At 9:56 AM -0400 6/4/07, Robert Cummings wrote: On Mon, 2007-06-04 at 09:50 -0400, tedd wrote: Don't scale, resample. See

Re: [PHP] Making thumbs same size

2007-06-05 Thread Robert Cummings
On Tue, 2007-06-05 at 16:29 +0200, Zoltán Németh wrote: I agree with the above idea. Errors should be logged (and possibly sent in notification mail to the developer or something like that), not displayed to the outside world, as they can expose sensitive information about your setup. It

Re: [PHP] Urgent::Implementing PKI in PHP

2007-06-05 Thread Jochem Maas
Renuka Marwah wrote: We have a website in PHP where we want to implement PKI. The scenario is that there would be some registered dealers who woud have to buy Digital signatures. When they come to our website they would input several information through PHP designed forms and use the digital

Re: [PHP] Making thumbs same size

2007-06-05 Thread tedd
Also, in my readings, I have read several books that say keeping any sort of error reporting code in your public script is not a good idea. In other words, don't give possible evil-doers any information. So, I should remove the error reporting statements as well. Yeah... I thought maybe

[PHP] indexes and arrays

2007-06-05 Thread blueboy
I have an array of facilities, how do I define them all in one go so I do not get the undefined index error? input name=facilities[5] type=checkbox id=facilities[5] value=Credit Cards Accepted ?php if ($_POST['facilities'][5]!='') { echo 'checked=checked '; }? Credit Cards Accepted

[PHP] Display Errors (was thumbs)

2007-06-05 Thread tedd
At 10:48 AM -0400 6/5/07, Robert Cummings wrote: On Tue, 2007-06-05 at 16:29 +0200, Zoltán Németh wrote: I agree with the above idea. Errors should be logged (and possibly sent in notification mail to the developer or something like that), not displayed to the outside world, as they can

Re: [PHP] Making thumbs same size

2007-06-05 Thread Robert Cummings
On Tue, 2007-06-05 at 10:59 -0400, tedd wrote: http://www.webbytedd.com/b/thumb/index.php I think you're cheating BTW... no matter what I put in for $_GET['s'], I always get your doggy, and I don't see your script testing for *cough* inappropriate access attempts ;) Cheers, Rob. --

Re: [PHP] Display Errors (was thumbs)

2007-06-05 Thread Robert Cummings
On Tue, 2007-06-05 at 11:07 -0400, tedd wrote: At 10:48 AM -0400 6/5/07, Robert Cummings wrote: On Tue, 2007-06-05 at 16:29 +0200, Zoltán Németh wrote: I agree with the above idea. Errors should be logged (and possibly sent in notification mail to the developer or something like that),

[PHP] returning the index number

2007-06-05 Thread blueboy
I have an array of files to be uploaded tdinput name=userfile[] type=file/td /tr tr td 2./td tdinput name=userfile[] type=file/td /tr tr td3./td tdinput name=userfile[] type=file I can get the name foreach ($_FILES['userfile']['name'] as $value) { echo $value } but I want the index

Re: [PHP] returning the index number

2007-06-05 Thread Robert Cummings
On Tue, 2007-06-05 at 16:39 +0100, blueboy wrote: I have an array of files to be uploaded tdinput name=userfile[] type=file/td /tr tr td 2./td tdinput name=userfile[] type=file/td /tr tr td3./td tdinput name=userfile[] type=file I can get the name $i = 0; foreach

Re: [PHP] returning the index number

2007-06-05 Thread Robert Cummings
On Tue, 2007-06-05 at 11:43 -0400, Robert Cummings wrote: On Tue, 2007-06-05 at 16:39 +0100, blueboy wrote: I have an array of files to be uploaded tdinput name=userfile[] type=file/td /tr tr td 2./td tdinput name=userfile[] type=file/td /tr tr td3./td tdinput

[PHP] returning the index number part2

2007-06-05 Thread blueboy
if I have an array of 3 images table class=signup_table tr td 1./td tdinput name=userfile[] type=file/td /tr tr td 2./td tdinput name=userfile[] type=file/td /tr tr td3./td tdinput name=userfile[] type=file /td /tr /table How do I access the filename? Like this? echo $fileName1 =

Re: [PHP] returning the index number part2

2007-06-05 Thread Robert Cummings
On Tue, 2007-06-05 at 17:16 +0100, blueboy wrote: if I have an array of 3 images table class=signup_table tr td 1./td tdinput name=userfile[] type=file/td /tr tr td 2./td tdinput name=userfile[] type=file/td /tr tr td3./td tdinput name=userfile[] type=file /td /tr /table How

Re: [PHP] indexes and arrays

2007-06-05 Thread Jim Lucas
td input name=facilities[6] type=checkbox id=facilities[6] value=Towels ?php if ( ! empty(POST['facilities'][6]) ) { echo 'checked=checked '; }

Re: [PHP] returning the index number

2007-06-05 Thread Jim Lucas
Robert Cummings wrote: On Tue, 2007-06-05 at 11:43 -0400, Robert Cummings wrote: On Tue, 2007-06-05 at 16:39 +0100, blueboy wrote: I have an array of files to be uploaded tdinput name=userfile[] type=file/td /tr tr td 2./td tdinput name=userfile[] type=file/td /tr tr td3./td tdinput

Re: [PHP] returning the index number part2

2007-06-05 Thread Jim Lucas
Robert Cummings wrote: On Tue, 2007-06-05 at 17:16 +0100, blueboy wrote: if I have an array of 3 images table class=signup_table tr td 1./td tdinput name=userfile[] type=file/td /tr tr td 2./td tdinput name=userfile[] type=file/td /tr tr td3./td tdinput name=userfile[] type=file /td /tr

[PHP] works in 4.4.2 - breaks in 5.2.1

2007-06-05 Thread Jim Berkey
I'm familiar with actionscript, but pretty new to php . . .I have a guestbook script that worked fine until my host upgraded to php 5.2.1 - can anyone tell me what part of my if statement or variable is breaking in 5.2.1? I send the new data with Flash using xml.sendAndLoad, to the xml file via

[PHP] Re: How can I DomDocument-renameNode?

2007-06-05 Thread Eric Wiener
Thanks for the reply, but the solution needs to be in PHP, not JavaScript. -Original Message- From: tedd [mailto:[EMAIL PROTECTED] Sent: Sunday, June 03, 2007 3:20 PM To: php-general@lists.php.net Subject: [PHP] Re: How can I DomDocument-renameNode? I have tried making a new node,

[PHP] Strings

2007-06-05 Thread Steve Marquez
The following code works: ?php $image = ³²; if ($image == NULL) { print ³False!²; }else{ print ³$var²; } ? However, this does not: ?php $image = ³²; if ($image == NULL) { print ³False!²; }else{ print ³img

Re: [PHP] works in 4.4.2 - breaks in 5.2.1

2007-06-05 Thread Jochem Maas
Jim Berkey wrote: I'm familiar with actionscript, but pretty new to php . . .I have a guestbook script that worked fine until my host upgraded to php 5.2.1 - can anyone tell me what part of my if statement or variable is breaking in 5.2.1? I send the new data with Flash using

Re: [PHP] Strings

2007-06-05 Thread Jochem Maas
do you notice the totally weird string delimiters in your original post? using either single quotes or double quotes (if you want variables named inside the string to be interpolated). read up on php strings here: http://php.net/string Steve Marquez wrote: The following code works:

Re: [PHP] returning the index number

2007-06-05 Thread Jochem Maas
Robert Cummings wrote: On Tue, 2007-06-05 at 11:43 -0400, Robert Cummings wrote: On Tue, 2007-06-05 at 16:39 +0100, blueboy wrote: I have an array of files to be uploaded ... $i = 0; foreach ($_FILES['userfile']['name'] as $value) { echo $value $i++; } I should be shot for

Re: [PHP] returning the index number part2

2007-06-05 Thread Robert Cummings
On Tue, 2007-06-05 at 09:33 -0700, Jim Lucas wrote: Robert Cummings wrote: On Tue, 2007-06-05 at 17:16 +0100, blueboy wrote: if I have an array of 3 images table class=signup_table tr td 1./td tdinput name=userfile[] type=file/td /tr tr td 2./td tdinput name=userfile[]

RE: [PHP] Strings

2007-06-05 Thread Jim Moseby
your syntax is broken because of the weird quotes it seems. I agree. After replacing all the superscripted 2's and 3's with proper quotes, the examples both work as expected. JM -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Strings

2007-06-05 Thread Robert Cummings
On Tue, 2007-06-05 at 19:57 +0200, Jochem Maas wrote: do you notice the totally weird string delimiters in your original post? using either single quotes or double quotes (if you want variables named inside the string to be interpolated). read up on php strings here:

Re: [PHP] Strings

2007-06-05 Thread Richard S. Crawford
On Tuesday 05 June 2007 10:50:15 Steve Marquez wrote: It seems that if I add a string, rather than just the variable, then does not work. I am getting an unexpected T_IS_EQUAL error. Your string delimiters are very strange; I'm not sure if your code has those in it or not, so I can't really

Re: [PHP] Strings

2007-06-05 Thread Robert Cummings
On Tue, 2007-06-05 at 11:04 -0700, Richard S. Crawford wrote: On Tuesday 05 June 2007 10:50:15 Steve Marquez wrote: It seems that if I add a string, rather than just the variable, then does not work. I am getting an unexpected T_IS_EQUAL error. Your string delimiters are very strange; I'm

Re: [PHP] Strings

2007-06-05 Thread Pastor Steve
Thank you. I tried what you suggested below and it gave me an unexpected T_CONSTANT_ESCAPED_STRING error. Would this be valid: (I am typing in my Entourage, but I am writing the code in Dreamweaver. You are probably seeing the quotes that Entourage (my email application) is giving you.) ?php

Re: [PHP] works in 4.4.2 - breaks in 5.2.1

2007-06-05 Thread Jim Berkey
Thanks, sorry to expose my extreme ignorance. Glad I could provide some comic relief, though :-) I appreciate the advice, will study php interfacing with mysql and set it up better. Will also study on pr0n spam and race conditions so I don't contribute to more bad code. You are probably right

[PHP] How to clone an entire XML node including childnodes?

2007-06-05 Thread Eric Wiener
Basically I am trying to turn something like this: divHello iJoe/i, nice to meet you/div into this: pHello iJoe/i, nice to meet you/p by making a new node, inserting before the old node and then removing the old node. The problem is that I am populating the value of the new

Re: [PHP] Strings

2007-06-05 Thread Jochem Maas
Robert Cummings wrote: On Tue, 2007-06-05 at 19:57 +0200, Jochem Maas wrote: do you notice the totally weird string delimiters in your original post? using either single quotes or double quotes (if you want variables named inside the string to be interpolated). read up on php strings here:

Re: [PHP] Strings

2007-06-05 Thread Jochem Maas
Pastor Steve wrote: Thank you. I tried what you suggested below and it gave me an unexpected T_CONSTANT_ESCAPED_STRING error. Would this be valid: (I am typing in my Entourage, but I am writing the code in Dreamweaver. get a real text editor before you go mad. textpad or ultraedit or

Re: [PHP] Strings

2007-06-05 Thread Steve Marquez
I got it to work! I just had to place the HTML elements outside of the PHP code. Thanks for your help. -- Steve Marquez on 6/5/07 2:02 PM Jochem Maas ([EMAIL PROTECTED]) wrote: Robert Cummings wrote: On Tue, 2007-06-05 at 19:57 +0200, Jochem Maas wrote: do you notice the totally weird

Re: [PHP] Strings

2007-06-05 Thread Jochem Maas
Pastor Steve wrote: Thank you. I tried what you suggested below and it gave me an unexpected T_CONSTANT_ESCAPED_STRING error. Would this be valid: (I am typing in my Entourage, but I am writing the code in Dreamweaver. You are probably seeing the quotes that Entourage (my email

RE: [PHP] Draw function diagram

2007-06-05 Thread Jay Blanchard
[snip] I want to draw diagram of function. how I should do this I dont work with gd ... [/snip] You will have to work with GD unless you want to do a text plot -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Draw function diagram

2007-06-05 Thread Khorosh Irani
Hello I have a function like (y(x)=sin(x)) that i convert it to post fix and then execute it.means that i coud get y for each x value now I have a simple question I want to draw diagram of function. how I should do this I dont work with gd and also i donot now how I should done this.but i think

Re: [PHP] Draw function diagram

2007-06-05 Thread Richard Lynch
On Tue, June 5, 2007 4:36 pm, Khorosh Irani wrote: Hello I have a function like (y(x)=sin(x)) that i convert it to post fix and then execute it.means that i coud get y for each x value now I have a simple question I want to draw diagram of function. how I should do this I dont work with gd

Re: [PHP] TableName with space

2007-06-05 Thread Richard Lynch
On Mon, June 4, 2007 11:51 pm, karthi keyan wrote: How can I create a table with spaces Order details in MSSQL using PHP? I am able to create manually the table name with space by providing the name in Double Quotes. Is there a way out to do this using PHP? If it worked manually with

Re: [PHP] Printing MSSQL-Query ERROR description in PHP

2007-06-05 Thread Richard Lynch
On Mon, June 4, 2007 11:02 pm, karthi keyan wrote: Is there any way to print the reason why the query has been failed, like the way MySQL-PHP has mysql_error()? Gee, I dunno. You think there might be? Maybe it's in the manual?! http://us2.php.net/manual/en/ref.mssql.php There are only 40

Re: [PHP] Fwd: php5 and sendmail

2007-06-05 Thread Richard Lynch
On Mon, June 4, 2007 4:55 pm, Arvind Autar wrote: Firstly, I'm not subcsribed so please CC me. The issue, I'm running FC6 with php5 and sendmail. I can use mail and send mail with client inlc telnet sessions. However, mailing with php is just not working. This is what I'm using. ?php

Re: [PHP] Fwd: php5 and sendmail

2007-06-05 Thread Richard Lynch
On Mon, June 4, 2007 5:09 pm, Jim Lucas wrote: ; For Unix only. You may supply arguments as well (default: sendmail -t -i). sendmail_path = /usr/sbin/sendmail Is /usr/bin/sendmail where it actually is? Should be, but you never know with distros like FC6 Do you not need the -t and/or -i

Re: [PHP] Removing a row from an Array

2007-06-05 Thread Richard Lynch
On Mon, June 4, 2007 2:13 pm, Ken Kixmoeller -- reply to [EMAIL PROTECTED] wrote: Hey - - - - - - -- To do this, I am: - looping through the array - copying the rows that I want to *keep* to a temp array, and - replacing the original array with the temp' one. Seems convoluted, but I

Re: [PHP] Double checking - I should turn off magic quotes

2007-06-05 Thread Richard Lynch
On Mon, June 4, 2007 9:02 am, Dave M G wrote: I've read on the manual that it's preferred to code with magic quotes off and to instead escape the data at runtime, as needed: Recently, while configuring my PHP so as to install the GD libraries, that the default option was to have magic quotes

Re: [PHP] Double checking - I should turn off magic quotes

2007-06-05 Thread Richard Lynch
On Mon, June 4, 2007 9:25 am, Dave M G wrote: Since my database is MySQL, does that mean using addslashes() and stripslashes()? In other words manually doing what magic quotes was doing automatically? Please start reading here: http://phpsec.org And, for the record, no, addslashes is NOT the

Re: [PHP] Security for uploaded PDF files

2007-06-05 Thread Richard Lynch
On Mon, June 4, 2007 7:37 am, Al wrote: I have an application, with mild security, that approved users can upload pdf files. Obviously, the security for executables with a simple pdf extension bothers me. I's like some suggestions on how I can protect against errant files with a pdf

Re: [PHP] undefined GD function

2007-06-05 Thread Richard Lynch
getimagesize is okay, because it's not really really a GD function, even though it's lumped in there... Did you restart Apache? (or the whole machine if you run IIS)? On Mon, June 4, 2007 5:38 am, C.R.Vegelin wrote: Hi All, I am testing some GD functions, but I'm getting undefined function

Re: [PHP] Strings

2007-06-05 Thread Richard Lynch
It would really help if you didn't use funky characters for quote that aren't quote in your email. It would help even more if you copy/paste your actual script. On Tue, June 5, 2007 12:50 pm, Steve Marquez wrote: The following code works: ?php $image = ³²; if ($image == NULL) {

Re: [PHP] works in 4.4.2 - breaks in 5.2.1

2007-06-05 Thread Richard Lynch
Does the xmlString print out? Cuz my first guess is they turned off RAW_POST_DATA in the upgrade, so it's just blank... On Tue, June 5, 2007 11:34 am, Jim Berkey wrote: I'm familiar with actionscript, but pretty new to php . . .I have a guestbook script that worked fine until my host upgraded

Re: [PHP] returning the index number part2

2007-06-05 Thread Richard Lynch
This will tell you how: ?php var_dump($_FILES); ? On Tue, June 5, 2007 11:16 am, blueboy wrote: if I have an array of 3 images table class=signup_table tr td 1./td tdinput name=userfile[] type=file/td /tr tr td 2./td tdinput name=userfile[] type=file/td /tr tr td3./td tdinput

Re: [PHP] Making thumbs same size

2007-06-05 Thread Richard Lynch
On Mon, June 4, 2007 1:44 am, Humani Power wrote: Hey hi!!. //get dimensions of the thumbnail $thumb_width=$width*0.10; $thumb_height=$height*.10; It's really up to YOU to choose the thumbnail constant size and to decide what to do about the aspect ratio You could crop or fill with black, or

[PHP] Which simple XML functions to use?

2007-06-05 Thread Marten Lehmann
Hello, mostly dealing with XML through the Perl-module XML::Simple I'm looking for a simple solution within PHP. PHP4 and PHP5 is available but the DOM XML-stuff seems to be bloated. What I'm looking is a function that receives an XML-document as a string, which parses the document which

Re: [PHP] indexes and arrays

2007-06-05 Thread Richard Lynch
On Tue, June 5, 2007 10:01 am, blueboy wrote: I have an array of facilities, how do I define them all in one go so I do not get the undefined index error? http://php.net/isset You also could make an array of checkboxes instead of hand-typing all that... $facilities = array(5='Credit

Re: [PHP] Which simple XML functions to use?

2007-06-05 Thread Jochem Maas
Marten Lehmann wrote: Hello, mostly dealing with XML through the Perl-module XML::Simple I'm looking for a simple solution within PHP. PHP4 and PHP5 is available but the DOM XML-stuff seems to be bloated. What I'm looking is a function that receives an XML-document as a string, which

[PHP] php_ldap.dll and PHP 4.4.7

2007-06-05 Thread Mike Walsh
I have upgraded my development area to PHP 4.4.7 and I can no longer use the LDAP extension. I only have 4-5 extensions enabled (GD2, PDF, ZIP, IMAP, LDAP) but I get the following error from LDAP: PHP Warning: Unknown(): Unable to load dynamic library './extensions\php_ldap.dll' - The

Re: [PHP] Draw function diagram

2007-06-05 Thread Khorosh Irani
Hi I worked alittle with gd It is my code for y(x)=sin(x)+cos(x): function Graph($rangeLow, $rangeHigh, $step) { $img = ImageCreate($this-width, $this-height); $background_color = imagecolorallocate($img, 0, 0, 0); $white = ImageColorAllocate($img, 255, 255, 255);

[PHP] explode string at new line

2007-06-05 Thread Davi
Hi all. I've the fowlling string: $_POST[my_text]=hi...\nthis is my multi-line\ntext; Can I use explode to have something like: $str[0]=hi...; $str[1]=this is my multi-line; $str[2]=text; $str=explode($_POST[my_text],'\n'); TIA and sorry the *very* poor english. -- Davi Vidal [EMAIL

Re: [PHP] explode string at new line

2007-06-05 Thread heavyccasey
That's exactly correct. Except I /think/ you should use \n instead of '\n'. On 6/5/07, Davi [EMAIL PROTECTED] wrote: Hi all. I've the fowlling string: $_POST[my_text]=hi...\nthis is my multi-line\ntext; Can I use explode to have something like: $str[0]=hi...; $str[1]=this is my multi-line;

Re: [PHP] explode string at new line

2007-06-05 Thread Davi
Em Terça 05 Junho 2007 23:52, [EMAIL PROTECTED] escreveu: That's exactly correct. Except I /think/ you should use \n instead of '\n'. Thank you for the reply... =) I'll check this... BTW: array explode ( string $delimiter, string $string [, int $limit] ) So, I was wrong... The right way,

Re: [PHP] explode string at new line

2007-06-05 Thread Chris
Davi wrote: Em Terça 05 Junho 2007 23:52, [EMAIL PROTECTED] escreveu: That's exactly correct. Except I /think/ you should use \n instead of '\n'. Thank you for the reply... =) I'll check this... BTW: array explode ( string $delimiter, string $string [, int $limit] ) So, I was wrong... The

Re: [PHP] explode string at new line

2007-06-05 Thread Davi
Em Quarta 06 Junho 2007 00:18, Chris escreveu: Davi wrote: Em Terça 05 Junho 2007 23:52, [EMAIL PROTECTED] escreveu: That's exactly correct. Except I /think/ you should use \n instead of '\n'. So, I was wrong... The right way, probaly, is: $str=explode(\n,$_POST[my_text]); If

Re: [PHP] explode string at new line

2007-06-05 Thread Jim Lucas
Chris wrote: Davi wrote: Em Terça 05 Junho 2007 23:52, [EMAIL PROTECTED] escreveu: That's exactly correct. Except I /think/ you should use \n instead of '\n'. Thank you for the reply... =) I'll check this... BTW: array explode ( string $delimiter, string $string [, int $limit] ) So, I

Re: [PHP] export to csv

2007-06-05 Thread Jim Lucas
Haig (Home) wrote: Hi everyone, I have a small problem when exporting mysql into csv format. The export works fine. The problem is, if the mysql table has a carriage return, opening the csv file in excel will display a square box where the carriage return is. Displaying the table on a