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

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: [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

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

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
lse { > // generic warning (or include non-JS base file) > } > ?> > > I know that would work but does it give the desired effect? > > Dan > > > --- > http://chrome.me.uk > > > -Original Message----- > From: tedd [mailto:[

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

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

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
The register globals is on with the live server, and off at home (my version is 4.3.2, the other is 4.1.2). does that matter? Thanks for the other tip, shall try that ... Thomas - Original Message - From: "Thomas Hochstetter" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, Aug

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 developinig a site for a conference where i

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

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

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);

RE: [PHP] 2 questions

2001-02-05 Thread PHPBeginner.com
Well, Cobalt Raq4 is not an easy-to-compile-on Server ... and 1 single IP when you get a dedicated server? no ... Get something else ... for example I know that InsideCrew.net give you 15 IP addresses for $125-$200 / month ... And they will also let you choose the OS ... Sincerely, Maxim M

Re: [PHP] 2 questions

2001-02-04 Thread WreckRman2
I use a RaQ3 and have no problems running PHP and MySQL. I started out using one IP but the biggest problem I found was that in order to view the site or make changes to it, the domain name must resolve to the server before it would work. I decided it would be best for me to assign each site a

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\)
Hi, name-based hostig is quite okay but you shoulsd know that the cobald raq needs an extra ip for each site offering anonymous ftp and using ssl-certificate !! i installed php4.04pl1 and mysql 3.22.32 ( its easy and straightforward ) [ have a look at cobalt-users list ] greetings andreas

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