RE: [PHP] 2 Questions.

2008-09-14 Thread Tom Shaw
8 4:50 AM To: Tom Shaw Cc: 'PHP General' Subject: Re: [PHP] 2 Questions. Tom Shaw schreef: > -Original Message- > From: Tom Shaw [mailto:[EMAIL PROTECTED] > Sent: Saturday, September 13, 2008 9:52 PM > To: 'Jochem Maas' > Subject: RE: [PHP] 2 Questi

Re: [PHP] 2 Questions.

2008-09-14 Thread Jochem Maas
Tom Shaw schreef: -Original Message- From: Tom Shaw [mailto:[EMAIL PROTECTED] Sent: Saturday, September 13, 2008 9:52 PM To: 'Jochem Maas' Subject: RE: [PHP] 2 Questions. iamjochem wrote: My second question is I've designed a very simple Postgres database wrapper.

Re: [PHP] 2 Questions.

2008-09-14 Thread Ashley Sheridan
On Sun, 2008-09-14 at 03:42 +0200, Jochem Maas wrote: > Yo Dan, > > your back! guess the honeymoon is well and truly over then ;-) > > Daniel Brown schreef: > > On Sat, Sep 13, 2008 at 8:14 PM, tedd <[EMAIL PROTECTED]> wrote: > >> While you might think an order number should be something else, k

RE: [PHP] 2 Questions.

2008-09-13 Thread Tom Shaw
-Original Message- From: Tom Shaw [mailto:[EMAIL PROTECTED] Sent: Saturday, September 13, 2008 9:52 PM To: 'Jochem Maas' Subject: RE: [PHP] 2 Questions. iamjochem wrote: >> My second question is I've designed a very simple Postgres database > wrapper. >> Th

Re: [PHP] 2 Questions.

2008-09-13 Thread Jochem Maas
ys that built it know the difference between an order and an order line and that they use both concepts. -Original Message- From: Jochem Maas [mailto:[EMAIL PROTECTED] Sent: Saturday, September 13, 2008 6:06 PM To: Tom Shaw Cc: 'PHP General' Subject: Re: [PHP] 2 Questions. Tom Shaw sch

Re: [PHP] 2 Questions.

2008-09-13 Thread tedd
At 8:26 PM -0400 9/13/08, Daniel Brown wrote: On Sat, Sep 13, 2008 at 8:14 PM, tedd <[EMAIL PROTECTED]> wrote: While you might think an order number should be something else, keep in mind that an order is simply an order. It is a point in time where a customer has agreed to purchase somethin

Re: [PHP] 2 Questions.

2008-09-13 Thread Daniel Brown
On Sat, Sep 13, 2008 at 8:14 PM, tedd <[EMAIL PROTECTED]> wrote: > > While you might think an order number should be something else, keep in mind > that an order is simply an order. It is a point in time where a customer has > agreed to purchase something and you have accepted and have cleared that

Re: [PHP] 2 Questions.

2008-09-13 Thread tedd
At 5:38 PM -0500 9/13/08, Tom Shaw wrote: Can anybody give me any good reasons not to use a time stamp as an order number in my shopping cart. It seems to me that the number is guaranteed to be random and it saves having to make an extra time column to keep track of the order. The only small conc

RE: [PHP] 2 Questions.

2008-09-13 Thread Tom Shaw
increment id would not work to differentiate between orders. Another user mentioned microtime. -Original Message- From: Jochem Maas [mailto:[EMAIL PROTECTED] Sent: Saturday, September 13, 2008 6:06 PM To: Tom Shaw Cc: 'PHP General' Subject: Re: [PHP] 2 Questions. Tom Shaw schr

Re: [PHP] 2 Questions.

2008-09-13 Thread Jochem Maas
Tom Shaw schreef: Can anybody give me any good reasons not to use a time stamp as an order number in my shopping cart. It seems to me that the number is guaranteed to be random and it saves having to make an extra time column to keep track of the order. The only small concern I have is the chance

Re: [PHP] 2 Questions.

2008-09-13 Thread Ashley Sheridan
On Sat, 2008-09-13 at 17:38 -0500, Tom Shaw wrote: > Can anybody give me any good reasons not to use a time stamp as an order > number in my shopping cart. It seems to me that the number is guaranteed to > be random and it saves having to make an extra time column to keep track of > the order. The

[PHP] 2 Questions.

2008-09-13 Thread Tom Shaw
Can anybody give me any good reasons not to use a time stamp as an order number in my shopping cart. It seems to me that the number is guaranteed to be random and it saves having to make an extra time column to keep track of the order. The only small concern I have is the chance that somebody order

Re: [PHP] 2 Questions: Static variables and the nature of the online manual

2008-03-04 Thread Svevo Romano
Yes Richard, In fact I know ActionScript and JavaScript and I'm trying to nail the peculiarities of php. I totally agree. I am not used to use ' -> ' to call a method if you know what I mean, but the rest is quite familiar, phew! :) Aside from that, this was just one of the things I could not real

Re: RES: [PHP] 2 Questions: Static variables and the nature of the online manual

2008-03-04 Thread Svevo Romano
Cheers Thiago, In fact this was going to be my next question. I think I will report a documentation bug, just because, after all the discussion we had today, I realize that this is quite a common behaviour in other languages, but for somebody new to languages, being them programming or scripting o

Re: [PHP] 2 Questions: Static variables and the nature of the online manual

2008-03-04 Thread Daniel Brown
On Tue, Mar 4, 2008 at 5:05 PM, Richard Lynch <[EMAIL PROTECTED]> wrote: > After you've learned a couple computer languages, the rest are mostly > about "differences" and "gotchas" rather than learning something new. > > Ok, except the Lisp/Scheme/Prolog stuff, where you have to think > inside-

Re: [PHP] 2 Questions: Static variables and the nature of the online manual

2008-03-04 Thread Richard Lynch
On Tue, March 4, 2008 10:12 am, Svevo Romano wrote: > Still, I jusy wonder how Jochem knew that the line is only executed > the > first time a function is called while this info is not available on > the > online manual. It's maybe all about how close you are to the community > and > how many degre

Re: [PHP] 2 Questions: Static variables and the nature of the online manual

2008-03-04 Thread Richard Lynch
On Tue, March 4, 2008 6:16 am, Svevo Romano wrote: > Hello, > > I got this e-mail address from the ŒAdd note¹ page within the php.net > website. I was going to post something that was a question and I > realised I > was in the wrong place :) > > I have 2 basic questions and I¹m sorry if they may se

Re: [PHP] 2 Questions: Static variables and the nature of the online manual

2008-03-04 Thread tedd
At 4:12 PM + 3/4/08, Svevo Romano wrote: Hi Daniel, Many thanks to you as well. I really appreciate your effort in answering my queries guys. It means I'll do my best with books and the online manual. And today I've probably found the best resource. The community! Still, I jusy wonder how J

RES: [PHP] 2 Questions: Static variables and the nature of the online manual

2008-03-04 Thread Thiago Pojda
-Mensagem original- De: Svevo Romano [mailto:[EMAIL PROTECTED] Hi there, Many thanks for your answer. I've also gone through your example and it took me 10 minutes to understand how the operator precedence was working there. Was expecting 1 on the first call :) But this is not the

Re: [PHP] 2 Questions: Static variables and the nature of the online manual

2008-03-04 Thread Svevo Romano
Just one word, Thanks :) S In 4/3/08 16:22, David Giragosian, [EMAIL PROTECTED] ha scritto > I would hazard a guess that the 'static' keyword and functionality > comes from ANSI C. I just pulled "The C Programming Language" by > Kernighan and Ritchie from the book case and it is described there

Re: [PHP] 2 Questions: Static variables and the nature of the online manual

2008-03-04 Thread David Giragosian
I would hazard a guess that the 'static' keyword and functionality comes from ANSI C. I just pulled "The C Programming Language" by Kernighan and Ritchie from the book case and it is described there in it. Essential book, by the way, IMHO. -- -David. When the power of love overcomes the love o

Re: [PHP] 2 Questions: Static variables and the nature of the online manual

2008-03-04 Thread Daniel Brown
On Tue, Mar 4, 2008 at 11:12 AM, Svevo Romano <[EMAIL PROTECTED]> wrote: > Still, I jusy wonder how Jochem knew that the line is only executed the > first time a function is called while this info is not available on the > online manual. It's maybe all about how close you are to the community and

Re: [PHP] 2 Questions: Static variables and the nature of the online manual

2008-03-04 Thread Svevo Romano
Ok Jochem, It makes a lot of sense. Now I know what I can expect from the manual and what kind of approach I should have. I hope to contribute as well in the future. Many thanks, S In 4/3/08 16:11, Jochem Maas, [EMAIL PROTECTED] ha scritto > Svevo Romano schreef: >> Hi there, >> >> Many thank

Re: [PHP] 2 Questions: Static variables and the nature of the online manual

2008-03-04 Thread Svevo Romano
Hi Daniel, Many thanks to you as well. I really appreciate your effort in answering my queries guys. It means I'll do my best with books and the online manual. And today I've probably found the best resource. The community! Still, I jusy wonder how Jochem knew that the line is only executed the f

Re: [PHP] 2 Questions: Static variables and the nature of the online manual

2008-03-04 Thread Jochem Maas
Svevo Romano schreef: Hi there, Many thanks for your answer. I've also gone through your example and it took me 10 minutes to understand how the operator precedence was working there. Was expecting 1 on the first call :) But this is not the point. You've nailed my question very preciseley in yo

Re: [PHP] 2 Questions: Static variables and the nature of the online manual

2008-03-04 Thread Daniel Brown
On Tue, Mar 4, 2008 at 7:16 AM, Svevo Romano <[EMAIL PROTECTED]> wrote: > The second question has to do with the online manual. I¹ve found several > things on that manual specified in comments and not in the actual manual > part of it. What is the nature of the manual? Contributions from volutee

Re: [PHP] 2 Questions: Static variables and the nature of the online manual

2008-03-04 Thread Svevo Romano
Hi there, Many thanks for your answer. I've also gone through your example and it took me 10 minutes to understand how the operator precedence was working there. Was expecting 1 on the first call :) But this is not the point. You've nailed my question very preciseley in your first answer: 'the pr

Re: [PHP] 2 Questions: Static variables and the nature of the online manual

2008-03-04 Thread Jochem Maas
Svevo Romano schreef: Hello, I got this e-mail address from the ŒAdd note¹ page within the php.net website. I was going to post something that was a question and I realised I was in the wrong place :) I have 2 basic questions and I¹m sorry if they may seem too basic. I¹m a bit new to php. The

[PHP] 2 Questions: Static variables and the nature of the online manual

2008-03-04 Thread Svevo Romano
Hello, I got this e-mail address from the ŒAdd note¹ page within the php.net website. I was going to post something that was a question and I realised I was in the wrong place :) I have 2 basic questions and I¹m sorry if they may seem too basic. I¹m a bit new to php. The first question has to do

Re: [PHP] 2 questions: Search in array and detect JS

2006-04-17 Thread Jochem Maas
1. I'm not the original poster (I wasn't asking a question) 2. don't post me or anyone else 'offlist' unless asked 3. WTF are you talking about? 4. if you say 'First' then that assumes there is a 'Second' coming. (that's sounds kinda funny given it was just Easter) suresh kumar wrote: First,

Re: [PHP] 2 questions: Search in array and detect JS

2006-04-16 Thread Jochem Maas
don't know if someone mentioned it already but i was digging around in the docs for something completely different and bumped into this: preg_grep() [http://php.net/preg_grep] and I thought of your question, might be just what your looking for. I can't remember having come across this func befo

Re: [PHP] 2 questions: Search in array and detect JS

2006-04-15 Thread John Wells
On 4/14/06, Ryan A <[EMAIL PROTECTED]> wrote: > The reason I ask is before serving an AJAX page I would like to make sure JS > is enabled, if not, serve the other "normal page"... I am sure I am not the > first person to come accross this little problem, how did you solve it? Dan eluded to a big p

Re: [PHP] 2 questions: Search in array and detect JS

2006-04-15 Thread Ryan A
Hey, Thanks for replying. for js detection, you can use that in a previous page : document.write('page'); page it is simple, and work fine. no need to have cookies enable-Nice, most of the methods disc

Re: [PHP] 2 questions: Search in array and detect JS

2006-04-15 Thread fabien champel
for js detection, you can use that in a previous page : document.write('page'); page it is simple, and work fine. no need to have cookies enable -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] 2 questions: Search in array and detect JS

2006-04-15 Thread fabien champel
js is client-side, php server side... it can't work fabien Chrome wrote: > How about > > > > > > > > if ($js) { > // whizzy Ajax code (or file include) > } else { > // generic warning (or include non-JS base file) > } > ?> > > I know that would work bu

RE: [PHP] 2 questions: Search in array and detect JS

2006-04-15 Thread Chrome
hp'; '"Stut"' Subject: Re: [PHP] 2 questions: Search in array and detect JS In your script, $js will be false false! Chrome wrote: > How about > > > > > > > > if ($js) { > // whizzy Ajax code (or file include) > } e

Re: [PHP] 2 questions: Search in array and detect JS

2006-04-15 Thread cajbecu
I know that would work but does it give the desired effect? > > Dan > > > --- > http://chrome.me.uk > > > -Original Message- > From: tedd [mailto:[EMAIL PROTECTED] > Sent: 15 April 2006 15:10 > To: Chrome; 'Ryan A'; '

RE: [PHP] 2 questions: Search in array and detect JS

2006-04-15 Thread Chrome
How about I know that would work but does it give the desired effect? Dan --- http://chrome.me.uk -Original Message- From: tedd [mailto:[EMAIL PROTECTED] Sent: 15 April 2006 15:10 To: Chrome; 'Ryan A'; 'php' Cc: '&qu

RE: [PHP] 2 questions: Search in array and detect JS

2006-04-15 Thread tedd
Something to consider might be: Sorry! This page requires Javascript to function properly! Please enable it or get a decent browser I haven't tested it so there is a chance it's fiction :) Of course, if web standards aren't a concern it makes no difference Dan It works and if you want i

RE: [PHP] 2 questions: Search in array and detect JS

2006-04-15 Thread Chrome
tion :) Of course, if web standards aren't a concern it makes no difference HTH Dan --- http://chrome.me.uk -Original Message- From: Ryan A [mailto:[EMAIL PROTECTED] Sent: 15 April 2006 14:26 To: php Cc: "Stut" Subject: Re: [PHP] 2 questions: Search in

Re: [PHP] 2 questions: Search in array and detect JS

2006-04-15 Thread Ryan A
Hey Stut, Thanks for replying. --- The way I do this is to serve the 'notmal page' first, but with the following snippet of JS in it... --Makes sense and pretty easy, this was suggested a while back, si

Re: [PHP] 2 questions: Search in array and detect JS

2006-04-15 Thread Stut
Ryan A wrote: 1) Is it possible to detect JavaScript via php... and yes I do know that JS is client side while PHP is server...but how else to do it? The reason I ask is before serving an AJAX page I would like to make sure JS is enabled, if not, serve the other "normal page"... I am sure I am no

Re: [PHP] 2 questions: Search in array and detect JS

2006-04-14 Thread Ryan A
Hey Tedd / Robert, Thanks for replying. -- Tedd: However, I read where one can detect if a user has cookies on by sending a cookie and then reading it back. And considering that you can send a cookie via js, you could do that. However, that would mean that the user had to have

Re: [PHP] 2 questions: Search in array and detect JS

2006-04-14 Thread Robert Cummings
On Fri, 2006-04-14 at 13:34, tedd wrote: > Ryan: > > First question. Technically no, you can't detect js from php. > > However, I read where one can detect if a user has cookies on by > sending a cookie and then reading it back. And considering that you > can send a cookie via js, you could do

Re: [PHP] 2 questions: Search in array and detect JS

2006-04-14 Thread tedd
Ryan: First question. Technically no, you can't detect js from php. However, I read where one can detect if a user has cookies on by sending a cookie and then reading it back. And considering that you can send a cookie via js, you could do that. However, that would mean that the user had to h

[PHP] 2 questions: Search in array and detect JS

2006-04-14 Thread Ryan A
Hi, Like the subject says; I have two questions: 1) Is it possible to detect JavaScript via php... and yes I do know that JS is client side while PHP is server...but how else to do it? The reason I ask is before serving an AJAX page I would like to make sure JS is enabled, if not, serve the other

Re: [PHP] 2 questions - PHP site Automatic search and slow display

2004-02-28 Thread Rasmus Lerdorf
Keep in mind that we have a "show source" button on every php.net page so you can see how everything is done. Here is the source for the code that handles the error redirection: http://www.php.net/source.php?url=/error.php -Rasmus On Sun, 29 Feb 2004, Ryan A wrote: > Hi, > I have to questio

[PHP] 2 questions - PHP site Automatic search and slow display

2004-02-28 Thread Ryan A
Hi, I have to questions which are pretty unrelated except that both of them are in PHP. (1) I am using a class to send email, 3 different kinds (text, html, text+html attachement) no problem there, but I am giving the client the option to mail all his members/clients at the same time...I have set

Re: [PHP] 2 questions

2003-08-25 Thread Binay Agarwal
- Original Message - From: "Thomas Hochstetter" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, August 24, 2003 12:54 AM Subject: RE: [PHP] 2 questions > The register globals is on with the live server, and off at home (my version > is 4.3.2, th

RE: [PHP] 2 questions

2003-08-23 Thread Thomas Hochstetter
ED]> Sent: Saturday, August 23, 2003 5:33 PM Subject: [PHP] 2 questions > Hi guys. > > I have two questions for you today: > > 1. Weired login problem > I am developinig a site for a conference where i have a login page for > members. This page is called index.php and includes

Re: [PHP] 2 questions

2003-08-23 Thread Binay Agarwal
- Original Message - From: "Thomas Hochstetter" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, August 23, 2003 5:33 PM Subject: [PHP] 2 questions > Hi guys. > > I have two questions for you today: > > 1. Weired login problem > I am d

[PHP] 2 questions

2003-08-23 Thread Thomas Hochstetter
Hi guys. I have two questions for you today: 1. Weired login problem I am developinig a site for a conference where i have a login page for members. This page is called index.php and includes different types of modules, according to the type of user logged on. The problem is now following: i have

[PHP] 2 Questions Re: Anonymous Functions

2003-06-09 Thread Timothy Boronczyk
I'm extracting a list of items from an XML document using PHP. The desired items are the attributes of different occurances of a specific element within the document; the code will not need a callback for character data or for closing tags. $list = new Array(); function start_tag($p_id, $element

Re: [PHP] 2 questions !

2003-03-03 Thread Chris Hewitt
Justin French wrote: I'm sure there's a way to check the owner of a file, but not (from what i know) a way to check who apache is running as. On linux "ps aux | grep httpd" will list as the first item the user the apache processes are running as. Ignore the one with root. On other unices the par

Re: [PHP] 2 questions !

2003-03-02 Thread Justin French
on 02/03/03 7:51 AM, Vincent M. ([EMAIL PROTECTED]) wrote: > Hello, > > I didn't find in the doc how to: > - Know the full path of the current directory. Like /var/www/to/the/path http://www.php.net/manual/en/reserved.variables.php#reserved.variables.serve r > - Know under which user work apac

[PHP] 2 questions !

2003-03-01 Thread Vincent M.
Hello, I didn't find in the doc how to: - Know the full path of the current directory. Like /var/www/to/the/path - Know under which user work apache, to know when I create a file whose file it is... Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php

[PHP] mail via php. 2 questions...

2003-01-16 Thread Øystein Håland
The first problem I cannot solve on my own: I get the mail content from a cookie. Quite a big cookie since it is a collection of 30 - 40 form values from another page. When recieving the mail, the content come in ONE long string, and in some places with a \. Of course, i dont want this to be printe

Re: [PHP] 2 questions about PHP download

2002-11-10 Thread Rasmus Lerdorf
> Is it possible to use the PHP-extentions for Apahce with the PHP for the > CGI version, while the version number matches? Yes > What is the md5-hash beneath the download for? To verify that the file you download (from a mirror, for example) matches the official tarball from www.php.net and has

[PHP] 2 questions about PHP download

2002-11-10 Thread SED
Is it possible to use the PHP-extentions for Apahce with the PHP for the CGI version, while the version number matches? What is the md5-hash beneath the download for? Regards, Sumarlidi E. Dadason SED - Graphic Design _ Tel: 896-0376, 461-5501 E-mail: [EMAIL PROT

Re: [PHP] 2 questions about performance...

2001-03-06 Thread Chris Lee
simplest answer is find out yourself. every machine will depending on config and hardware will be difffernet. start = mtime(); } function reset() { $all_vars = get_object_vars($this); foreach($all_vars as $pos => $val) if ($pos != 'error') unset($this->$pos);

[PHP] 2 questions about performance...

2001-03-06 Thread Joe Sheble \(Wizaerd\)
Is it in-efficient to use shuffle()? I have a simple 6 element array with 6 strings (URLs to images) and I'm using shuffle() to display all of them in random order upon each page load. The images take a long time (of course is relative, it's mere seconds) but when I remove the call to shuffle, t

RE: [PHP] 2 questions

2001-02-05 Thread PHPBeginner.com
Maletsky Founder, Chief Developer PHPBeginner.com (Where PHP Begins) [EMAIL PROTECTED] www.phpbeginner.com -Original Message- From: Adrian Teasdale [mailto:[EMAIL PROTECTED]] Sent: Monday, February 05, 2001 2:48 AM To: PHP List Post Subject: [PHP] 2 questions Hi I have a couple of

Re: [PHP] 2 questions

2001-02-04 Thread WreckRman2
n Teasdale <[EMAIL PROTECTED]> To: PHP List Post <[EMAIL PROTECTED]> Sent: Sunday, February 04, 2001 12:47 PM Subject: [PHP] 2 questions > Hi I have a couple of questions. One about hosting and the other about IP > addresses. The first on the IP's. > > I ha

Re: [PHP] 2 questions

2001-02-04 Thread Steve Werby
"Adrian Teasdale" <[EMAIL PROTECTED]> wrote: > I have been speaking to a company that I am looking at getting a dedicated > server from. They ONLY do one IP address per server and use name-based > hosting. I have asked for dedicated IP's, but their answer has been that > all hosting companies ar

Re: [PHP] 2 questions

2001-02-04 Thread andreas \(@work\)
- Original Message - From: "Adrian Teasdale" <[EMAIL PROTECTED]> To: "PHP List Post" <[EMAIL PROTECTED]> Sent: Sunday, February 04, 2001 6:47 PM Subject: [PHP] 2 questions > Hi I have a couple of questions. One about hosting and the other about IP

[PHP] 2 questions

2001-02-04 Thread Adrian Teasdale
Hi I have a couple of questions. One about hosting and the other about IP addresses. The first on the IP's. I have been speaking to a company that I am looking at getting a dedicated server from. They ONLY do one IP address per server and use name-based hosting. I have asked for dedic

Re: [PHP] 2 questions, can't find in the manual or archives . . .

2001-01-15 Thread Richard Lynch
> I'm writing a SYSV LP script in PHP so that I can have a > print-to-database (MySQL) solution. First question: Am I wasting my > time? Are there already canned solutions? (LPRng perhaps?) I think you could just exec() it... exec("/usr/bin/lp $blah", $output, $error); while (list(,$line) = each

[PHP] 2 questions, can't find in the manual or archives . . .

2001-01-15 Thread Foley, John
3 questions I guess. I'm writing a SYSV LP script in PHP so that I can have a print-to-database (MySQL) solution. First question: Am I wasting my time? Are there already canned solutions? (LPRng perhaps?) Second question: How do I go about opening file descriptors