Re: [PHP] Re: Create collections of objects

2008-02-15 Thread Peter Ford
Emilio Astarita wrote: > Peter Ford <[EMAIL PROTECTED]> writes: > >> Emilio Astarita wrote: >>> Hi people, >>> >> A static method should still be able to set values of private members. I do >> something like: >> ... >> > > Thank

Re: [PHP] Sending XML to MSIE7

2008-02-15 Thread Peter Ford
e URL, to be certain... That seems to work - IE7 sees the xml-stylesheet PI and doesn't then try to mangle the XML in it's own special way. Only problem is the extra hit on the server to get the XSLT... :( -- Peter Ford phone: 01580 89 Developer

Re: [PHP] Re: temporary error

2008-02-25 Thread Peter Ford
g me then fine. > > But the truth is it is harming all of us. Do we really want our > children taught about a magical sky-god who insists on genital > mutilation at birth? Do we want influences into our governments that > inhibit natural advances in modern scien

Re: [PHP] Transferring files between computers using php

2008-03-07 Thread Peter Ford
new directories sshfs B:/path_to_where_the_file_ismount_point_for_B sshfs C:/path_to_where_the_file_goes mount_point_for_C # Copy the file across: repeat this step every few seconds (cron job?) cp mount_point_for_B/the_file_to_copy mount_point_for_C # Unmount the SSHFS mounts when you'

[PHP] Re: fwrite/fclose troubles

2008-03-20 Thread Peter Ford
ay you were constructing the file name: interpolating the variables in a string is slightly less efficient than concatenating the bits together, and there are possible gotchas when using the $this->variable structure in a string like that. An alternative syntax is to escape the variables with

[PHP] Re: Pattern etc to reduce duplicated validation?

2008-03-27 Thread Peter Ford
d value for bar in class foo'); } } } // = Script = $var = $_POST['var']; $foo = new foo(); try { $foo->setBar($var); } catch (Exception $e) { echo 'An error occurred: ',$e->getMessage(),"\n"; } Take a look at http://www.php.net/manual/en/language.exc

Re: [PHP] Re: optimilize web page loading

2008-03-27 Thread Peter Ford
,$foo; is actually the fastest, because the strings are not concatenated before output. I think that was the overall summary - I can't locate the original post to verify (or attribute) but it's in this list somewhere... Cheers -- Peter Ford phone: 015

Re: [PHP] Re: optimilize web page loading

2008-03-28 Thread Peter Ford
Eric Butera wrote: On Thu, Mar 27, 2008 at 12:41 PM, Peter Ford <[EMAIL PROTECTED]> wrote: Jason Pruim wrote: > > On Mar 27, 2008, at 11:05 AM, Shawn McKenzie wrote: >> Al wrote: >>> Good point. I usually do use the single quotes, just happened to key

[PHP] Re: putting variables in a variable

2008-03-28 Thread Peter Ford
nd the src attribute to avoid those ugly backslashes ... $body .=" "; Might be better in this case to use heredoc syntax ... $body .<< EndOfChunk; -- Peter Ford phone: 01580 89 Developer fax: 015

Re: [PHP] dynamic boxes problem... JS and PHP

2008-04-08 Thread Peter Ford
View Generated Source tool which will show you what Firefox thinks your page actually looks like after the JS has run... 2. Check that the TD you are loading with content is actually inside the tags - otherwise the inputs won't be included in the request/post variables... Cheers Pete -- Pe

Re: [PHP] dynamic boxes problem... JS and PHP

2008-04-09 Thread Peter Ford
Peter Ford wrote: Mark Weaver wrote: Ryan S wrote: Hey everyone, A bit of a puzzle here, dont know if this is a JS problem or PHP or FF or just me. (My money is on the last one :p ) Here's what I am trying to do: In a form I have a listbox with the values 1-5, and unde

Re: [PHP] dynamic boxes problem... JS and PHP

2008-04-09 Thread Peter Ford
. Your Javascript code also adds a spurious tag (line 17 of dynamic_no_of_recipients2.js) This is not really anything to do with PHP, of course... :) -- Peter Ford, Developer phone: 01580 89 fax: 01580 893399 Justcroft International Ltd. w

Re: [PHP] Quarters -- ERRORS --

2008-04-14 Thread Peter Ford
Document.getElementById() works fine in IE5 and later. There must be some other error. You could check that document.getElementById(id) is actually returning something - if it fails it returns null. Maybe you have given your checkbox a name and not an id, although that should fail with FF (and Saf

[PHP] Re: File Upload Security

2008-04-14 Thread Peter Ford
to find a nice Unix magic numbers file that returns mime types (they're easier to parse than regular magic number responses). Probably something like /usr/share/misc/magic.mime, but that depends on the system. -- Peter Ford phone: 01580 89 Developer

[PHP] Re: newbie with another HTML/navigation question

2008-04-29 Thread Peter Ford
WebDeveloper tool bar - it has a View Generated Source function which extracts the source from the DOM model the browser used to render the page. -- Peter Ford phone: 01580 89 Developer fax: 01580 893399 Justcroft International

[PHP] Re: problem with for loop

2008-05-02 Thread Peter Ford
ck the boundary conditions on your loop. As you write it, for($i = 1; $i <= $number; $i++) if $number is 4 then $i will have the values 1,2,3,4. Perhaps message list is zero-based, and you actually need to count from zero: for($i = 0; $i < $number; $i++) so you would get

[PHP] Re: A Little Something.

2008-05-12 Thread Peter Ford
sandboxes) 'course, there are many sites that make the same call to urchinTracker(), and many many worse errors... Cheers Pete -- Peter Ford phone: 01580 89 Developer fax: 01580 893399 Justcroft International Ltd., Staplehurs

Re: [PHP] Re: A Little Something.

2008-05-12 Thread Peter Ford
Stut wrote: On 12 May 2008, at 09:39, Peter Ford wrote: tedd wrote: Hi gang: This is what I did this morning: http://webbytedd.com/bb/tribute/ It speaks for itself. Cheers, tedd tedd, Nothing to do with the subject matter, but I noticed because it is one of your more simple pages: I get a

Re: [PHP] Re: A Little Something.

2008-05-13 Thread Peter Ford
s that make me laugh) and tend to choose what products I buy based on my own research, rather than what a marketing droid thinks I need to buy. Anyway, this is waaay off-topic: it was right from the start - sorry everyone :( I'll keep my pet peeves private from now on ..

[PHP] Re: Scripts slowing down?

2008-05-13 Thread Peter Ford
see if there are any messages written around the time that yourt script runs. Don't always assume that it is your code that is wrong (that's what managers are for) -- Peter Ford phone: 01580 89 Developer fax: 01580 893399 J

[PHP] Choosing PHP or ? for building an automatic photo web.

2008-06-08 Thread Peter Sorensen
ithin a limited amount of hours? Is PHP the choice? Do I need to use mySQL for this? What features must the webhotel suport and do you know if Surftown does? Is there anywhere I get template source code for this, free or at a low price? best regards Peter Sørensen -- PHP General Mai

Re: [PHP] Choosing PHP or ? for building an automatic photo web.

2008-06-09 Thread Peter Sorensen
tp://stut.net/ - Original Message - From: "Stut" <[EMAIL PROTECTED]> Newsgroups: php.general To: "Peter Sorensen" <[EMAIL PROTECTED]> Cc: Sent: Sunday, June 08, 2008 11:27 PM Subject: Re: [PHP] Choosing PHP or ? for building an automatic photo web. On

RE: [PHP] PHP Command line script

2007-05-02 Thread Peter Lauri
Check the error from mysqli: http://fi.php.net/manual/en/function.mysqli-error.php Best regards, Peter Lauri www.dwsasia.com - company web site www.lauri.se - personal web site www.carbonfree.org.uk - become Carbon Free > -Original Message- > From: Nathaniel Hall [mailto:

RE: [PHP] exec dont work for svn

2007-05-29 Thread Peter Lauri
Hi, In many apps the messages comes as STDERR, so try: exec("svn update 2>&1", $out); Best regards, Peter Lauri www.dwsasia.com - company web site www.lauri.se - personal web site www.carbonfree.org.uk - become Carbon Free > -Original Message- > From: Manol

RE: [PHP] Removing a row from an Array

2007-06-04 Thread Peter Lauri
Using array_pop wouldn't do it, as it just removes the last element. You could use unset() for the rows you don't want to keep. Best regards, Peter Lauri www.dwsasia.com - company web site www.lauri.se - personal web site www.carbonfree.org.uk - become Carbon Free > -Ori

[PHP] Exceptions

2007-08-09 Thread Peter Pan
Peeps, I'm having an issue where throwing Exceptions are displaying a blank page even though the Exception is being caught in a try...catch statement. This is happening on our production server where warnings, errors, exceptions, etc. are not to be displayed to the user. The assumption is th

Re: [PHP] Exceptions

2007-08-09 Thread Peter Pan
ogging suggestion is a great idea, but not realistic given the amount of times this function is called. Thank you for your help! I'll update the list with my findings. -ec From: "Nathan Nobbe" <[EMAIL PROTECTED]> To: "Peter Pan" <[EMAIL PROTECTED]> CC: php

RE: [PHP] Controlling a scanner with PHP

2006-06-27 Thread Peter Lauri
Probably nobody, as PHP is a Server Side Scripting Language. -Original Message- From: George Pitcher [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 27, 2006 7:16 PM To: php-general@lists.php.net Subject: [PHP] Controlling a scanner with PHP Hi, I have been asked to look at extending one

RE: [PHP] Controlling a scanner with PHP

2006-06-27 Thread Peter Lauri
Maybe JavaScript can do it for you? -Original Message- From: George Pitcher [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 27, 2006 8:01 PM To: Peter Lauri Subject: RE: [PHP] Controlling a scanner with PHP Peter, I take it you have spoken to everyone on the list then? I know that PHP

RE: [PHP] Controlling a scanner with PHP

2006-06-27 Thread Peter Lauri
Stut, You are correct. PHP can be used in much more extent, but my tiny box where I use PHP has never touched that area though :) I did truly enjoy the continuing of the thread, because I learned that PHP is much more then a Web Server Scripting Language :) /Peter -Original Message

[PHP] Find out cookies on a computer?

2006-06-29 Thread Peter Lauri
Is it possible to some how find out all cookies on a specific computer and their name and value? I assume not :) /Peter

[PHP] RE: Find out cookies on a computer?

2006-06-29 Thread Peter Lauri
AM To: Peter Lauri Cc: php-general@lists.php.net Subject: Re: Find out cookies on a computer? Peter Lauri wrote: > Is it possible to some how find out all cookies on a specific computer and > their name and value? I assume not :) > > > > /Peter > No, because you don'

RE: [PHP] Re: Find out cookies on a computer?

2006-06-29 Thread Peter Lauri
The global array $_COOKIE should hold any cookie which is available to you Yes, but that is just for the ones available for me. Like Google, they set a cookie if you click on one of their "adwords" ads and then use them in the tracking of the customer conversion. Cookies like this are interesti

RE: [PHP] RE: Find out cookies on a computer?

2006-06-29 Thread Peter Lauri
Thank you, great reading :) -Original Message- From: Richard Collyer [mailto:[EMAIL PROTECTED] Sent: Friday, June 30, 2006 5:01 AM To: php-general@lists.php.net Subject: Re: [PHP] RE: Find out cookies on a computer? Peter Lauri wrote: > Is the question dumb? Why you answer it then?

RE: [PHP] design?

2006-06-30 Thread Peter Lauri
How about answer extends question? -Original Message- From: David Tulloh [mailto:[EMAIL PROTECTED] Sent: Friday, June 30, 2006 9:36 AM To: Sjef Cc: php-general@lists.php.net Subject: Re: [PHP] design? Sjef wrote: > Hi there, > > I am starting a new, very small project. A simple question

[PHP] GD to database directly

2006-07-10 Thread Peter Lauri
regards, Peter Lauri

RE: [PHP] GD to database directly

2006-07-10 Thread Peter Lauri
storage procedure by changing in my file storage class if a change will be necessary. /Peter -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Setting cookie on one domain for an other domain

2006-07-20 Thread Peter Lauri
s set and then return. Question is: Can I not set a cookie at domain1.com to work at domain2.com? Best regards, Peter Lauri

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] 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 f

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 PROTECT

RE: [PHP] jpg to pdf using fpdf

2006-07-26 Thread Peter Lauri
figaro [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 26, 2006 8:44 PM To: PHP List Subject: Re: [PHP] jpg to pdf using fpdf Peter Lauri a écrit : > This is code how it works for me: > > $pdf =& new FPDF('p','pt','a4'); > $pdf->AddPage(); &g

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 b

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

RE: [PHP] sorting in array

2006-07-30 Thread Peter Lauri
function cmpcountry($a, $b) { $country1 = $a['country']; $country2 = $b['country']; if($country1=='') return 1; else return ($country1 < $country2) ? -1 : 1; } -Original Message- From: weetat [mailto:[EMAIL PROTECTED] Sent: Monday, July

RE: [PHP] sorting in array

2006-07-31 Thread Peter Lauri
And this for DESCending function cmpcountry($a, $b) { $country1 = $a['country']; $country2 = $b['country']; if($country1=='' OR $country2=='') { if($country1==$country2) return 0; elseif($country1=='') return

RE: [PHP] sorting in array

2006-07-31 Thread Peter Lauri
if($country1==$country2) return 0; elseif($country1=='') return 1; else return -1; } else return ($country1 < $country2) ? -1 : 1; } /Peter -Original Message- From: Paul Novitski [mailto:[EMAIL PROTECTED]

[PHP] All active variables?

2006-08-01 Thread Peter Lauri
Hi, Is it possible to print out all variables that are active within a script without doing it manually? This is what I would like to do: $a = 12; $b = 'Peter'; $c = 'Lauri'; echo ''; print_r( get_all_variables() ); echo ''; Best regards, Peter L

RE: [PHP] All active variables?

2006-08-01 Thread Peter Lauri
Great stuff, I probably just searched the wrong words. -Original Message- From: Stut [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 01, 2006 6:22 PM To: Peter Lauri Cc: php-general@lists.php.net Subject: Re: [PHP] All active variables? Peter Lauri wrote: > Is it possible to print

[PHP] SQL injection

2006-08-02 Thread Peter Lauri
I was just doing it to check if they were protected, and I informed them about my process etc. I only deleted my record, no one else's. In Sweden it might have been called "computer break-in", but I am not sure. Anyone with experience of a similar thing? Best regards, Peter Lauri

RE: [PHP] SQL injection

2006-08-02 Thread Peter Lauri
quot;hiding for something you did not do". One at the forum sent me an message off the list and said: "You got bigger balls than me. :-)", what did he mean with that? I did not know that the php list also shows the web cam at the same time. "I better watch out"... Best regard

[PHP] SQL injection - Again

2006-08-03 Thread Peter Lauri
ey contain "DELETE FROM" or "TRUNCATE" or similar. I am aware of that I can create different db-users to restrict this, but in some hosting cases I only have access to one db-user. I also always use sprintf() so make sure integers etc are used where I expect integers. /Peter

RE: [PHP] PayPal's PHP SDK on Windows

2006-08-05 Thread Peter Lauri
Hi, Try www.php.net/curl /Peter -Original Message- From: s2j1j1b0 [mailto:[EMAIL PROTECTED] Sent: Saturday, August 05, 2006 1:51 PM To: php-general@lists.php.net Subject: [PHP] PayPal's PHP SDK on Windows I'm trying to get PayPal's PHP SDK running on Windows

RE: [PHP] saving and retrieving an array from a database

2006-08-07 Thread Peter Lauri
http://se2.php.net/serialize /Peter -Original Message- From: Ross [mailto:[EMAIL PROTECTED] Sent: Monday, August 07, 2006 7:19 PM To: php-general@lists.php.net Subject: [PHP] saving and retrieving an array from a database Hi, I have an array of values. I want to save them with php to

RE: [PHP] php and printing

2006-08-07 Thread Peter Lauri
You can generate a PDF with fpdf and then print that. -Original Message- From: Jef Sullivan [mailto:[EMAIL PROTECTED] Sent: Monday, August 07, 2006 8:50 PM To: php-general@lists.php.net Subject: [PHP] php and printing Greetings to everyone, I have been able to program the capability

RE: [PHP] php/ajax..

2006-08-07 Thread Peter Lauri
Robert, have you studied Neuron Networks? -Original Message- From: Robert Cummings [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 08, 2006 2:16 AM To: [EMAIL PROTECTED] Cc: php-general@lists.php.net Subject: Re: [PHP] php/ajax.. On Mon, 2006-08-07 at 12:11 -0700, bruce wrote: > hi.. >

[PHP] Mixing sprintf and mysql_real_escape_string

2006-08-07 Thread Peter Lauri
)); Should this be like this? Do the sprintf already add slashes or something? /Peter -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Mixing sprintf and mysql_real_escape_string

2006-08-07 Thread Peter Lauri
essage- From: Richard Lynch [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 08, 2006 5:54 AM To: Peter Lauri Cc: php-general@lists.php.net Subject: Re: [PHP] Mixing sprintf and mysql_real_escape_string On Mon, August 7, 2006 12:35 pm, Peter Lauri wrote: > I get strange output if I combine sprin

RE: [PHP] Mixing sprintf and mysql_real_escape_string

2006-08-07 Thread Peter Lauri
[snip]My guess: magic_quotes_gpc is enabled where you're running the script. Therefore slashes are already present in the data from the form post.[/snip] Should I turn it off? Adding slashes and mysql_real_escape_string is not exactly the same thing, correct? /Peter -- PHP General Mailing

RE: [PHP] sending a variable variables to a function

2006-08-08 Thread Peter Lauri
The function needs to be declared without "variable variable" Du like this instead: function my_function($module) { // do something with $module } And then you call the function with the variable variable: my_function($$module_no); /Peter -Original Message- From: Ro

[PHP] preg_match

2006-08-09 Thread Peter Lauri
Hi, How do I add so that it checks for a comma , in this preg_match. I think the documentation is not that good for the pref_match: preg_match('/^[a-z0-9-_\'() +]*$/i', $s); /Peter

RE: [PHP] preg_match

2006-08-10 Thread Peter Lauri
might need to do some more research on that, it seams to be a good tool :) I will do some testing in the CMD to learn how to use it, should not be that big of a deal :) Many times the regex looks like rubbish, but that is just because I do not know the "language" :) Thanks, Peter ---

RE: [PHP] SETCOOKIE

2006-08-12 Thread Peter Lauri
When you just use time() you tell the cookie to just live until now, so it dies directly. You have to add some seconds to determine how long the cookie will live. /Peter -Original Message- From: BBC [mailto:[EMAIL PROTECTED] Sent: Saturday, August 12, 2006 7:48 PM To: PHP Subject: [PHP

RE: [PHP] SETCOOKIE

2006-08-13 Thread Peter Lauri
[snip] On Sat, August 12, 2006 8:00 am, Peter Lauri wrote: > When you just use time() you tell the cookie to just live until now, > so it > dies directly. You have to add some seconds to determine how long the > cookie > will live. Unfortunately, no... The above solution rel

[PHP] Need PHP developer in Thailand

2006-08-14 Thread Peter Lauri
e is maybe a PHP developer from another country that is interested to come to Bangkok for a year, not that great pay, but living standard are great. Best regards, Peter Lauri -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] script to check if form is submitted from the same page?

2006-08-14 Thread Peter Lauri
And I assume that this should be reused to minimize the time spent on this by creating a form class or function, correct? I have been thinking about this too, and it makes a lot sense to do like this. /Peter -Original Message- From: Richard Lynch [mailto:[EMAIL PROTECTED] Sent

RE: [PHP] Espanol en esto lista

2006-08-16 Thread Peter Lauri
I have no clue what he is saying, but I believe he is asking if there is any list in Spanish he can join. But I might be wrong :) -Original Message- From: Dave Goodchild [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 16, 2006 5:20 PM To: Rory Browne Cc: php-general@lists.php.net Subjec

RE: [PHP] Espanol en esto lista

2006-08-16 Thread Peter Lauri
But I was almost correct. The "hay otra lista en espanol" looks like something with "list" and spanish :) Great stuff... let us learn some Thai too: Mee mailing list php pasa Thai mai? Or Swedish: Finns det någon phplista på svenska? /Peter -Original Message- F

RE: [PHP] Re: Dhtml/javasript layer tips or software (0.T)

2006-08-18 Thread Peter Lauri
Some might suggest using JavaScript and storing the hint and solution with that. However, then it is easy for the student to cheat. You could use AJAX for this to load the info from the server upon request and put it into an "alert" or into a div with a specific id using innerHTML (JS

RE: [PHP] Dhtml/javasript layer tips or software (0.T)

2006-08-18 Thread Peter Lauri
Now I get interested, what is KISS? :) -Original Message- From: Robert Cummings [mailto:[EMAIL PROTECTED] Sent: Saturday, August 19, 2006 12:14 PM To: Peter Lauri Cc: 'Ryan A'; 'php php' Subject: RE: [PHP] Dhtml/javasript layer tips or software (0.T) On Sat, 2006-

RE: [PHP] Dhtml/javasript layer tips or software (0.T)

2006-08-18 Thread Peter Lauri
Robert, Isn't it to easy to cheat if you do like this? Just view the source and you have the answers. But, this is maybe not for examination, maybe just for learning. If it is examination, AJAX would be better, so that they can not find out the solution by just looking at the source. /

RE: [PHP] Dhtml/javasript layer tips or software (0.T)

2006-08-19 Thread Peter Lauri
I am a KISSER! :) -Original Message- From: Robert Cummings [mailto:[EMAIL PROTECTED] Sent: Saturday, August 19, 2006 1:26 PM To: Peter Lauri Cc: 'Ryan A'; 'php php' Subject: RE: [PHP] Dhtml/javasript layer tips or software (0.T) On Sat, 2006-08-19 at 12:32 +070

RE: [PHP] OT alternate website authentication methods

2006-08-19 Thread Peter Lauri
1. Why not a scanner that scans your fingerprint and use that as authentication method? Then you do not need any username or password, you are who you are :) 2. Ten multiple choice questions where you have to preset the system with 5 of your dreams that only you know about, and then you have to be

RE: [PHP] syntax error help

2006-08-20 Thread Peter Lauri
Check the version of MySQL, I think sub queries came in version 4.1 and you are using that. So you probably have a version>=4.1 at localhost, and <4.1 at your server. /Peter -Original Message- From: Bigmark [mailto:[EMAIL PROTECTED] Sent: Sunday, August 20, 2006 5:19 PM To: php-g

RE: [PHP] Shopping cart

2006-08-20 Thread Peter Lauri
Agreed... -Original Message- From: Skip Evans [mailto:[EMAIL PROTECTED] Sent: Monday, August 21, 2006 8:25 AM To: Gerry D Cc: Larry Garfield; php-general@lists.php.net Subject: Re: [PHP] Shopping cart Granted, the shopping cart/credit card processing modules I've been required to write

[PHP] Overriding core functions

2006-08-22 Thread Peter Lauri
them, creating an own logging function. I did a lot of Google, but no article that I found that take care of this subject. /Peter

RE: [PHP] Overriding core functions

2006-08-22 Thread Peter Lauri
Yes, of course I can do that. But I was just lazy and wanted to reuse the function mysql_query that I am already using. -Original Message- From: Paul Scott [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 22, 2006 7:48 PM To: Peter Lauri Cc: php-general@lists.php.net Subject: Re: [PHP

RE: [PHP] Overriding core functions

2006-08-22 Thread Peter Lauri
7:27 PM To: Peter Lauri Cc: php-general@lists.php.net Subject: Re: [PHP] Overriding core functions Peter Lauri wrote: > Hi, > > > > I want to add some functionality when calling the mysql_query(): > > > function my_query($Query) { //do stuff before

[PHP] usort within a class

2006-08-23 Thread Peter Lauri
usort($array, "$this->myCompareFunction"); } } function myCompareFunction($a, $b) { //return rajraj depending on $a and $b values } Best regards, Peter Lauri -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] usort within a class

2006-08-23 Thread Peter Lauri
Working perfect, thanks :) I did RTFM but I did miss that :) -Original Message- From: Robert Cummings [mailto:[EMAIL PROTECTED] Sent: Thursday, August 24, 2006 3:46 AM To: Peter Lauri Cc: php-general@lists.php.net Subject: Re: [PHP] usort within a class On Thu, 2006-08-24 at 03:13 +0700

RE: [PHP] upload image

2006-08-24 Thread Peter Lauri
$Query = "INSERT INTO filestorage (name, author, filename, filetype, filesize, filedata) VALUES ('$name', '$author', '$filename', '$filetype', '$filesize', '{$filedata}')"; /Peter -Origin

RE: [PHP] functions classes

2006-08-25 Thread Peter Lauri
It should not be to big of a problem if you can set your mind into thinking about functions and objects instead of a step by step script. Then just cut it in pieces and your are done :) -Original Message- From: Bigmark [mailto:[EMAIL PROTECTED] Sent: Friday, August 25, 2006 4:40 PM To: ph

[PHP] Email with pregmatch

2006-08-27 Thread Peter Lauri
] What is the error here :) /Peter -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Email with pregmatch

2006-08-27 Thread Peter Lauri
#x27;/^[a-z0-9\.-]+$/', $email_components[1]) ) return TRUE; // If we get here then it didn't pass return FALSE; } /Peter From: Dave Goodchild [mailto:[EMAIL PROTECTED] Sent: Sunday, August 27

RE: [PHP] Problems with UTF

2006-08-28 Thread Peter Lauri
Hi, Have you set header('Content-Type: text/html; charset=utf-8'); in your php script that you call via AJAX? Best regards, Peter PS! I assumed you were not sending any variables with the AJAX request? If so, you would need to do an utf-8 encoding of the variables and then a base6

RE: [PHP] replace single and double quotes

2006-08-29 Thread Peter Lauri
ot;, $act_extra, $act_extra_fr, $act_id); Notice the %d for the id part if $act_id should be integer. /Peter -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 29, 2006 8:28 PM To: [EMAIL PROTECTED] Cc: php-general@lists.php.net Subject: Re: [PHP] re

RE: [PHP] replace single and double quotes

2006-08-29 Thread Peter Lauri
blog http://www.lauri.se/article/4/security-hole-in-golfdatase about a big and important golf organization in Sweden and how they screwed up about their security. Hrm, I might be wrong here :) /Peter -Original Message- From: Jochem Maas [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 29, 2006

RE: [PHP] send a file or stream

2006-08-29 Thread Peter Lauri
Do you mean the following: 1. A user sends a request to your server to get a compressed file 2. You compress the file on the server 3. You want to send back to compressed file to the server It is number 3 you asking for? In that case: /Peter -Original Message- From: Rafael Mora

RE: [PHP] send a file or stream

2006-08-29 Thread Peter Lauri
Should do it then. if you know the path to the file :) _ From: Rafael Mora [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 30, 2006 10:10 AM To: Peter Lauri Subject: Re: [PHP] send a file or stream 1. A user sends a request to your server to get a compressed file 2. You

RE: [PHP] send a file or stream

2006-08-29 Thread Peter Lauri
octet-stream. /Peter _ From: Rafael Mora [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 30, 2006 10:25 AM To: Peter Lauri Cc: php-general@lists.php.net Subject: Re: [PHP] send a file or stream I test it and gave me this: xœ ÉÈ,V¢D…'Ôâ=®(??/§C0/¿D!1O!3· ¿¨$1¯D¡¸¤(3/]

RE: [PHP] send a file or stream

2006-08-29 Thread Peter Lauri
e="stations.gzip"'); header("Content-Transfer-Encoding: binary"); header("Content-Length: ".filesize(stations.gzip)); readfile("stations.gzip"); /Peter PS! To maintain the list and its functionality, do not post same message multiple times DS! -Ori

[PHP] BMP and GDlib

2006-08-30 Thread Peter Lauri
. So the question is: Is there really no function in php so that I can recreate a BMP and change the size of it? I have it all working with jpg and gif. /Peter

[PHP] Not using cached version

2006-08-30 Thread Peter Lauri
ght direction if you can :) /Peter www.lauri.se - my personal blog www.dwsasia.com - the company I work for -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Not using cached version

2006-08-30 Thread Peter Lauri
Thanks. I went for the version where I use the path to the file instead :) /Peter -Original Message- From: Stut [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 30, 2006 5:02 PM To: Peter Lauri Cc: php-general@lists.php.net Subject: Re: [PHP] Not using cached version Peter Lauri wrote

[PHP] substr and UTF-8

2006-08-30 Thread Peter Lauri
string works fine, but the last character does mostly "break". How can I determine the start and end of a character. I hope the problem is clear enough, is it? :) Best regards, Peter Lauri www.lauri.se - personal web site www.dwsasia.com - company web site -- PHP General Mailing

RE: [PHP] what's all the about then?

2006-08-30 Thread Peter Lauri
f a script depending on what the GET variables values are. /Peter -Original Message- From: Ross [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 30, 2006 7:10 PM To: php-general@lists.php.net Subject: [PHP] what's all the about then? There is a site which has interesting b

RE: [PHP] substr and UTF-8

2006-08-30 Thread Peter Lauri
[snip] Actually this is false. I don't know what I was thinking. The high bit will be set in all bytes of a UTF-8 byte sequence. If it's not it's an ASCII character. The bytes are actually layed out as follows [1]: U- ___ U-007F: 0xxx U-0080 ___ U-07FF: 110x

RE: [PHP] send a file or stream

2006-08-30 Thread Peter Lauri
But can you download it correctly? Is it just the download box that shows 0 bytes? Or is it so that you actually is doing what you do below readfile() without any argument? So that you are actually downloading something empty? :) /Peter -Original Message- From: Rafael Mora [mailto

RE: [PHP] send a file or stream

2006-08-30 Thread Peter Lauri
readfile(); -Original Message- From: Rafael Mora [mailto:[EMAIL PROTECTED] Sent: Thursday, August 31, 2006 1:25 AM To: Peter Lauri Cc: php-general Subject: Re: [PHP] send a file or stream I can download it, but when I see the file I downloaded has 0 bytes, and I have readfile("stations.

RE: [PHP] php generated javascript

2006-08-30 Thread Peter Lauri
that is the case you can join the [EMAIL PROTECTED] list for that purpose. /Peter -Original Message- From: Shu Hung (Koala) [mailto:[EMAIL PROTECTED] Sent: Thursday, August 31, 2006 10:41 AM To: PHP General Users Subject: [PHP] php generated javascript Hello, I'm writing a scri

<    9   10   11   12   13   14   15   16   17   18   >