Re: [PHP] Re: Stumped! 4.x to 5.1 problem!!

2006-07-26 Thread Jochem Maas
markw@mohawksoft.com wrote: markw@mohawksoft.com wrote: [snip] seems the perceived problem is being caused by something else? Sorry, I have to respectfully disagree. ok :-). Men of integrity must be able to disgree peacefully. :-) :-) Well, the point I was trying to make was that

[PHP] pop up save dialog box

2006-07-26 Thread weetat
Hi all, I have code below which save MYSQL to csv file. I am using ADODB library to do this. The saving MYSQL to csv file is ok . However i need to allow the the user to enter file name for csv file. Anybody have any ideas how to do this? Thanks $sql = $_SESSION['CSV_SQL']; $_logger =

Re: [PHP] Efficiency question

2006-07-26 Thread Rory Browne
For something like that that, unless you are doing it inside a loop, I wouldn't really worry about efficiency as much as I would about security On 7/26/06, Paul Scott [EMAIL PROTECTED] wrote: I have googled around a bit, but not really found anything useful... Which is more efficient? A case

[PHP] Big files management

2006-07-26 Thread Yannick Warnier
Hi there, I'm trying to deal with big files (over 4GB) with PHP4.3.9 ans PHP4.4 but obviously it's not really possible. Is there a library somewhere that allows elementary operations on these kinds of files by, for example, using the operating systems commands (Linux in this case)? Or any other

Re: [PHP] Efficiency question

2006-07-26 Thread Jochem Maas
Paul Scott wrote: I have googled around a bit, but not really found anything useful... Which is more efficient? A case switch or a $$method style method? both examples are just boilerplate 'frontcontroller' code that do pretty much nothing of themselves. - in terms of speed you will

Re: [PHP] Big files management

2006-07-26 Thread Jochem Maas
Yannick Warnier wrote: Hi there, I'm trying to deal with big files (over 4GB) with PHP4.3.9 ans PHP4.4 but obviously it's not really possible. no, we're not quite at the 4GB-flash-header-files-for-webpages stage of internet evolution ;-) Is there a library somewhere that allows

[PHP] problem using

2006-07-26 Thread php
Hi I am reading a username and password from a file. For the moment I am trying to test if the username and password are the same as user inputted username/password. My code snippet is as follows: if( $out[0][0] == $u $out[0][1] == $p ) { $error = Login successful!;

Re: [PHP] problem using

2006-07-26 Thread Jochem Maas
[EMAIL PROTECTED] wrote: Hi I am reading a username and password from a file. For the moment I am trying to test if the username and password are the same as user inputted username/password. My code snippet is as follows: if( $out[0][0] == $u $out[0][1] == $p ) {

Re: [PHP] problem using

2006-07-26 Thread Sameer N Ingole
[EMAIL PROTECTED] wrote: if( $out[0][0] == $u $out[0][1] == $p ) { $error = Login successful!; } else { $error = Invalid username/password. Try again; } If I just test if( $out[0][1] == $u ) it works.

Re: [PHP] problem using

2006-07-26 Thread Jochem Maas
[EMAIL PROTECTED] wrote: On Wed, 26 Jul 2006 13:22:02 +0200, Jochem Maas [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: Hi I am reading a username and password from a file. For the moment I am trying to test if the username and password are the same as user inputted username/password.

RE: [PHP] pop up save dialog box

2006-07-26 Thread Jay Blanchard
[snip] I have code below which save MYSQL to csv file. I am using ADODB library to do this. The saving MYSQL to csv file is ok . However i need to allow the the user to enter file name for csv file. Anybody have any ideas how to do this? Thanks [/snip] If you want a true pop-up you

Re: [PHP] problem using

2006-07-26 Thread Sameer N Ingole
Dear Eoghan, May be you should'n just hit Reply/Reply All button. -- Sameer N. Ingole http://weblogic.noroot.org/gallery2/v/travel/lonar/ --- Better to light one candle than to curse the darkness. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] pop up save dialog box

2006-07-26 Thread Andrei
This is only an example and threat it as example. Take care about security too. So don't copy and paste :) You could do like this: weetat wrote: Hi all, I have code below which save MYSQL to csv file. I am using ADODB library to do this. The saving MYSQL to csv file is ok . However

Re: [PHP] problem using

2006-07-26 Thread php
On Wed, 26 Jul 2006 13:54:15 +0200, Jochem Maas [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: On Wed, 26 Jul 2006 13:22:02 +0200, Jochem Maas [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: Hi I am reading a username and password from a file. For the moment I am trying to

Re: [PHP] problem using

2006-07-26 Thread php
On Wed, 26 Jul 2006 13:54:15 +0200, Jochem Maas [EMAIL PROTECTED] wrote: var_dump($out, $u, $p, ( user == user)); Jochem Thank you, var_dump showed me i had an extra space at the end of the password. I trimmed the vales from the file and it works fine now. Eoghan -- PHP General

[PHP] Htmlentities vs htmlspecialchars

2006-07-26 Thread Dave Goodchild
Hi all. I know htmlspecialchars converts the smallest set of entities possible to generate valid HTML, and that htmlentities goes much further, so what is the difference? Is it not better to use htmlentities in every case, making htmlspecialchars somewhat redundant, or is there a performance

Re: [PHP] problem using

2006-07-26 Thread Jochem Maas
[EMAIL PROTECTED] wrote: On Wed, 26 Jul 2006 13:54:15 +0200, Jochem Maas [EMAIL PROTECTED] wrote: var_dump($out, $u, $p, ( user == user)); Jochem Thank you, var_dump showed me i had an extra space at the end of the password. I trimmed the vales from the file and it works fine now. LOL

Re: [PHP] Htmlentities vs htmlspecialchars

2006-07-26 Thread Jochem Maas
Dave Goodchild wrote: Hi all. I know htmlspecialchars converts the smallest set of entities possible to generate valid HTML, and that htmlentities goes much further, so what is the difference? Is it not better to use htmlentities in every case, making htmlspecialchars somewhat redundant, or

[PHP] sorting array question

2006-07-26 Thread Angelo Zanetti
Hi all, Need some advice as to how to sort a array: Structure: partnerID partnerName total totalPaid totalUnpaid So basically there will be many entries for the following: eg: partnerID | partnerName | total | totalPaid | totalUnpaid 1 marc 12 5

[PHP] jpg to pdf using fpdf

2006-07-26 Thread nicolas figaro
Hi, I'd like to convert a jpg image to a pdf document using the fpdf class. (www.fpdf.org). here is the code : ?php require(fpdf.php); $image=/pat/to/image.jpg; $pdf = new FPDF(); $pdf-open(); $pdf-image($image,0,0); $pdf-Output(/path/to/image.pdf,'F'); ? but I only get a blank a4 pdf

RE: [PHP] jpg to pdf using fpdf

2006-07-26 Thread Peter Lauri
Correct me if I am wrong, but do fpdf allow jpg? I think you must convert to PNG or GIF and then use that image. -Original Message- From: nicolas figaro [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 26, 2006 8:24 PM To: PHP List Subject: [PHP] jpg to pdf using fpdf Hi, I'd like to

Re: [PHP] Htmlentities vs htmlspecialchars

2006-07-26 Thread Michael Rasmussen
On Wed, 26 Jul 2006 14:59:46 +0200, Jochem Maas wrote: I wonder if anyone can given a solid answer to this? If I remember correctly, htmlspecialchars does what its name indicate: konvert any character with special meaning according to the HTML specification. htmlentities converts any character

Re: [PHP] jpg to pdf using fpdf

2006-07-26 Thread nicolas figaro
Peter Lauri a écrit : Correct me if I am wrong, but do fpdf allow jpg? I think you must convert to PNG or GIF and then use that image. I correct you. FPDF allow jpg. take a look at ttp://www.fpdf.org/en/doc/image.htm Supported formats are JPEG and PNG. N F -- PHP General Mailing List

RE: [PHP] jpg to pdf using fpdf

2006-07-26 Thread Peter Lauri
So then it was the opposite of what I had in memory :) -Original Message- From: nicolas figaro [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 26, 2006 8:30 PM To: 'PHP List' Subject: Re: [PHP] jpg to pdf using fpdf Peter Lauri a écrit : Correct me if I am wrong, but do fpdf allow jpg?

RE: [PHP] jpg to pdf using fpdf

2006-07-26 Thread Peter Lauri
This is code how it works for me: $pdf = new FPDF('p','pt','a4'); $pdf-AddPage(); $pdf-Image(pdf/profilechart.png,145,$pdf-GetY()); $pdf-Output(pdf/temp/thepdf.pdf,'F'); Add the $pdf-AddPage(); and it might work :) -Original Message- From: nicolas figaro [mailto:[EMAIL PROTECTED]

Re: [PHP] problem using

2006-07-26 Thread Jochem Maas
tedd wrote: [EMAIL PROTECTED] wrote: On Wed, 26 Jul 2006 13:54:15 +0200, Jochem Maas [EMAIL PROTECTED] wrote: var_dump($out, $u, $p, ( user == user)); Jochem Thank you, var_dump showed me i had an extra space at the end of the password. I trimmed the vales from the file and it works

Re: [PHP] jpg to pdf using fpdf

2006-07-26 Thread nicolas figaro
Peter Lauri a écrit : This is code how it works for me: $pdf = new FPDF('p','pt','a4'); $pdf-AddPage(); $pdf-Image(pdf/profilechart.png,145,$pdf-GetY()); $pdf-Output(pdf/temp/thepdf.pdf,'F'); Add the $pdf-AddPage(); and it might work :) addpage did the trick. thanks peter. next question

RE: [PHP] jpg to pdf using fpdf

2006-07-26 Thread Peter Lauri
Check the FPDF function in the manual http://www.fpdf.org/en/doc/fpdf.htm, I think you can set custom size of the PDF. You have to figure out how to get the image size first, hint: getImageSize();), and then convert it to the units you use for the pdf. -Original Message- From: nicolas

Re: [PHP] sorting array question

2006-07-26 Thread John Wells
On 7/26/06, Angelo Zanetti [EMAIL PROTECTED] wrote: Hi all, So they way I want to sort these rows is by total, totalPaid, totalUnpaid all descending. Hi Angelo, So the first question the list will ask is if the array of data is coming from a database. Because then you'd be urged to perform

[PHP] strptime() compatibility function ...

2006-07-26 Thread Jochem Maas
out of frustration of needing and not having strptime() on certain machines [read: windows] and on certain versions of php [read: pre5.1] I wrote a crude userland 'compat' function. it works in so far as I have tested it... but it feels like a crap implementation, my attempt is below, the

Re: [PHP] sorting array question

2006-07-26 Thread Angelo Zanetti
hi guys, thanks for the replies! yes Melanie, you were correct the last example (i had an old version of the manual). seemed to do the trick =) Thanks to john as well for the reply. Angelo Melanie Maddix wrote: [snip] So they way I want to sort these rows is by total, totalPaid,

Re: [PHP] problem using

2006-07-26 Thread php
On Wed, 26 Jul 2006 14:53:34 +0200, Jochem Maas [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: On Wed, 26 Jul 2006 13:54:15 +0200, Jochem Maas [EMAIL PROTECTED] wrote: var_dump($out, $u, $p, ( user == user)); Jochem Thank you, var_dump showed me i had an extra space at the

Re: [PHP] problem using

2006-07-26 Thread Jochem Maas
[EMAIL PROTECTED] wrote: On Wed, 26 Jul 2006 14:53:34 +0200, Jochem Maas [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: On Wed, 26 Jul 2006 13:54:15 +0200, Jochem Maas [EMAIL PROTECTED] wrote: var_dump($out, $u, $p, ( user == user)); Jochem Thank you, var_dump showed me i had an

Re: [PHP] jpg to pdf using fpdf

2006-07-26 Thread tedd
At 3:23 PM +0200 7/26/06, nicolas figaro wrote: Hi, I'd like to convert a jpg image to a pdf document using the fpdf class. (www.fpdf.org). here is the code : ?php require(fpdf.php); $image=/pat/to/image.jpg; $pdf = new FPDF(); $pdf-open(); $pdf-image($image,0,0);

Re: [PHP] problem using

2006-07-26 Thread php
On Wed, 26 Jul 2006 17:01:51 +0200, Jochem Maas [EMAIL PROTECTED] wrote: I sure wont. On the topic of my array, what would be an efficient way of checking my username/passwordd pairs match the user input form my login form. The text file contains username and passwords in the following

[PHP] Books: PHP and WAP

2006-07-26 Thread Angelo Zanetti
Hi all, I need some recommendations for books: are there any good books on PHP and WAP/WML? Also (OT) a recommendation regarding books for CSS2 and XHTML. Thanks in advance -- Angelo Zanetti Systems developer

Re: [PHP] Books: PHP and WAP

2006-07-26 Thread Paul Scott
Angelo, On Wed, 2006-07-26 at 17:53 +0200, Angelo Zanetti wrote: I need some recommendations for books: are there any good books on PHP and WAP/WML? Also (OT) a recommendation regarding books for CSS2 and XHTML. Not sure about books, but if you are interested in this area, I would

RE: [PHP] Books: PHP and WAP

2006-07-26 Thread Peter Lauri
http://www.w3schools.com/wap/default.asp That is a good start... -Original Message- From: Angelo Zanetti [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 26, 2006 10:54 PM To: PHP List Subject: [PHP] Books: PHP and WAP Hi all, I need some recommendations for books: are there any good

Re: [PHP] Books: PHP and WAP

2006-07-26 Thread Austin Denyer
Angelo Zanetti wrote: Hi all, I need some recommendations for books: are there any good books on PHP and WAP/WML? Also (OT) a recommendation regarding books for CSS2 and XHTML. http://www.hudzilla.org/phpbook/ Regards, Austin. signature.asc Description: OpenPGP digital signature

[PHP] APC + Fatal error: Cannot redeclare class...

2006-07-26 Thread jon
So... I've got some code that works just fine without APC, but dies when I add it. Here's the error: Fatal error: Cannot redeclare class php -v = PHP 5.1.2 (cli) (built: Jul 18 2006 23:21:00) ... any ideas what's up? Obviously, there are other ways I can improve performance on that box, but

[PHP] card scanners and PHP

2006-07-26 Thread Jay Blanchard
For our retail application (written in PHP) we are looking for a class that will work with a scanner to scan a driver's license or business card and populate the forms properly with that data. I have found a product (IDScan) that may work with PHP, but I was hoping to find others to compare it to.

RE: [PHP] card scanners and PHP

2006-07-26 Thread Jim Moseby
For our retail application (written in PHP) we are looking for a class that will work with a scanner to scan a driver's license or business card and populate the forms properly with that data. I have found a product (IDScan) that may work with PHP, but I was hoping to find others to

Re: [PHP] card scanners and PHP

2006-07-26 Thread Miles Thompson
At 04:31 PM 7/26/2006, Jay Blanchard wrote: For our retail application (written in PHP) we are looking for a class that will work with a scanner to scan a driver's license or business card and populate the forms properly with that data. I have found a product (IDScan) that may work with PHP,

RE: [PHP] card scanners and PHP

2006-07-26 Thread Jay Blanchard
[snip] Do you mean a magnetic stripe reader? Information is scattered all over business cards. [/snip] Most states do not allow access to their mag stripes, and one company that I have found so far uses what is essentially an OCR scanner and a software called IDScan to parse the data. They even

Re: [PHP] Big files management

2006-07-26 Thread Yannick Warnier
Le mercredi 26 juillet 2006 à 12:27 +0200, Jochem Maas a écrit : Yannick Warnier wrote: Hi there, I'm trying to deal with big files (over 4GB) with PHP4.3.9 ans PHP4.4 but obviously it's not really possible. no, we're not quite at the 4GB-flash-header-files-for-webpages stage of

Re: [PHP] APC + Fatal error: Cannot redeclare class...

2006-07-26 Thread Jochem Maas
jon wrote: So... I've got some code that works just fine without APC, but dies when I add it. Here's the error: Fatal error: Cannot redeclare class that error doesn't tell us much more than you in the context you give... but I'm gonna put money on the fact that your doing something like

Re: [PHP] APC + Fatal error: Cannot redeclare class...

2006-07-26 Thread jon
Thanks man... it turns out that I really was redeclaring the class, but it didn't throw an error until I added APC. Kinda weird, yeah? Anyway... it's all good now. -- jon Jochem Maas wrote: jon wrote: So... I've got some code that works just fine without APC, but dies when I add

RE: [PHP] fpdf

2006-07-26 Thread Peter Lauri
Yes you can... $pdf-Output(thelocation/filename.pdf, F); Just make sure that thelocation has permission to write for the web server. /Peter -Original Message- From: João Cândido de Souza Neto [mailto:[EMAIL PROTECTED] Sent: Thursday, July 27, 2006 7:05 AM To: php-general@lists.php.net

[PHP] Return Values Copied? Copied if By Reference?

2006-07-26 Thread Michael B Allen
Is a function return value copied? If the value is an integer I suppose it is but what about a string or an array? If you pass by reference is the return value still copied? For example, is this: function foo($arr) { $arr[] = bar; } faster than this? function foo($arr) {

Re: [PHP] Return Values Copied? Copied if By Reference?

2006-07-26 Thread Robert Cummings
On Wed, 2006-07-26 at 22:29, Michael B Allen wrote: Is a function return value copied? If the value is an integer I suppose it is but what about a string or an array? If you pass by reference is the return value still copied? For example, is this: function foo($arr) { $arr[] =

Re: [PHP] Return Values Copied? Copied if By Reference?

2006-07-26 Thread Larry Garfield
On Wednesday 26 July 2006 21:41, Robert Cummings wrote: I'm working on some code that would be called to generate a cell in a possibly large table and therefore a small difference in performance may have a significant impact. PHP uses copy-on-write and so copies are essentially shared