Re: [PHP] help out a noob w/ include & switch?

2005-09-20 Thread Philip Hallstrom
Hi All, My very first post to this group as I'm a freshly spanked new born php baby. Hope I have the correct stop for noob tech questions. Please re-direct me if I have it wrong. I've been doing web dev for a quite while with a variety of methods (html, xhtml/css, cfml, flash/as, on and on.

Re: [PHP] Wikimedia - php4

2005-09-20 Thread Robert Cummings
On Wed, 2005-09-21 at 01:20, Rasmus Lerdorf wrote: > Robert Cummings wrote: > > I think you mean novice use. There are certainly times when assigning an > > object to a variable I want all the values currently referring to that > > object to see the update and not just the variable being assigned t

Re: [PHP] Wikimedia - php4

2005-09-20 Thread Rasmus Lerdorf
Robert Cummings wrote: > I think you mean novice use. There are certainly times when assigning an > object to a variable I want all the values currently referring to that > object to see the update and not just the variable being assigned to. I > understand that objects in PHP5 are passed by refere

Re: [PHP] Wikimedia - php4

2005-09-20 Thread Vizion
On Tuesday 20 September 2005 22:14, the author Robert Cummings contributed to the dialogue on- Re: [PHP] Wikimedia - php4: >On Wed, 2005-09-21 at 01:08, Rasmus Lerdorf wrote: >> Robert Cummings wrote: >> > On Wed, 2005-09-21 at 00:58, Rasmus Lerdorf wrote: >> >>And for PHP5 you can just drop a

Re: [PHP] Wikimedia - php4

2005-09-20 Thread Robert Cummings
On Wed, 2005-09-21 at 01:08, Rasmus Lerdorf wrote: > Robert Cummings wrote: > > On Wed, 2005-09-21 at 00:58, Rasmus Lerdorf wrote: > > > >>And for PHP5 you can just drop all references related to objects and it > >>will do the right thing. > > > > > > Eeeek, that's not entirely true. Sometimes y

Re: [PHP] Wikimedia - php4

2005-09-20 Thread Rasmus Lerdorf
Robert Cummings wrote: > On Wed, 2005-09-21 at 00:58, Rasmus Lerdorf wrote: > >>And for PHP5 you can just drop all references related to objects and it >>will do the right thing. > > > Eeeek, that's not entirely true. Sometimes you want a real reference to > an object even in PHP5 :/ $a = new f

Re: [PHP] Wikimedia - php4

2005-09-20 Thread Robert Cummings
On Wed, 2005-09-21 at 00:58, Rasmus Lerdorf wrote: > > And for PHP5 you can just drop all references related to objects and it > will do the right thing. Eeeek, that's not entirely true. Sometimes you want a real reference to an object even in PHP5 :/ Cheers, Rob. -- .---

Re: [PHP] Wikimedia - php4

2005-09-20 Thread Rasmus Lerdorf
Vizion wrote: > function &setupTemplate( $classname, $repository=false, > $cache_dir=false ) { > return new $classname(); > ^^ > } Is that really all they have in that function? It seems rather useless to me. Why call a function

Re: [PHP] Wikimedia - php4

2005-09-20 Thread Rasmus Lerdorf
Vizion wrote: > Notice: Only variable references should be returned by reference > in /usr2/virtualwebs/forumkatrina.org/wiki/includes/ObjectCache.php on line > 369 > > Notice: Only variable references should be returned by reference > in /usr2/virtualwebs/forumkatrina.org/wiki/includes/ObjectC

Re: [PHP] losing session data with cross-site scripting

2005-09-20 Thread Jasper Bryant-Greene
Steve Lefevre wrote: I have a php site on a production server. The production server doesn't have the spell libraries, and rather than migrate the site, we setup spell checking functions on the development site, and shuttled the users back and forth with specially crafted get links and forms.

[PHP] losing session data with cross-site scripting

2005-09-20 Thread Steve Lefevre
Hey folks - I have a php site on a production server. The production server doesn't have the spell libraries, and rather than migrate the site, we setup spell checking functions on the development site, and shuttled the users back and forth with specially crafted get links and forms. The POS

Re: [PHP] Wikimedia - php4

2005-09-20 Thread Vizion
On Tuesday 20 September 2005 19:37, the author Jasper Bryant-Greene contributed to the dialogue on- Re: [PHP] Wikimedia - php4: >Vizion wrote: >> Hi >> >> I have just installed wikimedia on freebsd 5.3 with php4-4.4.0. > >I think you mean MediaWiki (common mistake!) > >> After starting the pro

Re: [PHP] Wikimedia - php4

2005-09-20 Thread Vizion
On Tuesday 20 September 2005 19:26, the author Vizion contributed to the dialogue on- [PHP] Wikimedia - php4: >Hi > > >I have just installed wikimedia on freebsd 5.3 with php4-4.4.0. > >After starting the program after a "successful" installation I get the error >messages shown below. There ar

Re: [PHP] Wikimedia - php4

2005-09-20 Thread Jasper Bryant-Greene
Vizion wrote: Hi I have just installed wikimedia on freebsd 5.3 with php4-4.4.0. I think you mean MediaWiki (common mistake!) After starting the program after a "successful" installation I get the error messages shown below. There are three eror from two lines of code. I have included the

[PHP] Wikimedia - php4

2005-09-20 Thread Vizion
Hi I have just installed wikimedia on freebsd 5.3 with php4-4.4.0. After starting the program after a "successful" installation I get the error messages shown below. There are three eror from two lines of code. I have included the relevant code. Having just started to learn php, I am not com

[PHP] Re: SUCCESS! Re: help out a noob w/ include & switch?

2005-09-20 Thread Ben
jay thompson said the following on 09/20/05 17:35: > Thank you all for the kind help. I have The site working now (once i move it > from the test loc. I'll post a link here. It's for a performance art > festival here in vancouver). The was actually with $_GET in the switch as > suggested by Ben. Th

Re: [PHP] professional code quick tip ---last---

2005-09-20 Thread adriano ghezzi
thx to all -- final release & good nigh! $f=0; if ( $ar[0]>0 and $ar[0]<=12) $f=1; elseif ( $ar[0]>12 and $ar[0]<=14) $f=2; elseif ( $ar[0]>14 and $ar[0]<=18) $f=3;

[PHP] SUCCESS! Re: help out a noob w/ include & switch?

2005-09-20 Thread jay thompson
Thank you all for the kind help. I have The site working now (once i move it from the test loc. I'll post a link here. It's for a performance art festival here in vancouver). The was actually with $_GET in the switch as suggested by Ben. Thnks! I do however know about it's usage and even investigat

Re: [PHP] professional code quick tip

2005-09-20 Thread Thorsten Suckow-Homberg
$100... cuz I'm sure you didn't mean to compound those conditionals such that PHP doesn't understand them ;) nargh... yes you're right... send me your account information along with your paypal login. I'll send you the money asap ;) -- PHP General Mailing List (http://www.php.net/) To unsubs

Re: [PHP] professional code quick tip

2005-09-20 Thread Jasper Bryant-Greene
Robert Cummings wrote: On Tue, 2005-09-20 at 19:55, Thorsten Suckow-Homberg wrote: I'm certain that is illegal. Wanna bet? :) $100... cuz I'm sure you didn't mean to compound those conditionals such that PHP doesn't understand them ;) Fair enough, but I believe it was the use of the swit

Re: [PHP] professional code quick tip

2005-09-20 Thread Robert Cummings
On Tue, 2005-09-20 at 19:55, Thorsten Suckow-Homberg wrote: > > I'm certain that is illegal. > > Wanna bet? :) $100... cuz I'm sure you didn't mean to compound those conditionals such that PHP doesn't understand them ;) snaffu:~> php foo.php Content-type: text/html X-Powered-By: PHP/4.4.0 Pars

Re: [PHP] professional code quick tip

2005-09-20 Thread Jasper Bryant-Greene
Robert Cummings wrote: On Tue, 2005-09-20 at 19:47, Thorsten Suckow-Homberg wrote: You could use the following statement: I'm certain that is illegal. I don't think so, although I'm not able to test it right at this second. PHP compares the value within the switch statement to the value

Re: [PHP] professional code quick tip

2005-09-20 Thread Thorsten Suckow-Homberg
I'm certain that is illegal. Wanna bet? :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] help out a noob w/ include & switch?

2005-09-20 Thread Thorsten Suckow-Homberg
[...] Try the following: 1) include() will only trigger a warning if the requested file is not within the include path. Thus, to make sure the file is found, you should use "require()" which triggers a fatal error and prevends the script from being executed if the given filename as the param

Re: [PHP] professional code quick tip

2005-09-20 Thread Robert Cummings
On Tue, 2005-09-20 at 19:47, Thorsten Suckow-Homberg wrote: > You could use the following statement: > > switch (true) { > case (0 < $n <= 4): > $f = 1; > break; > case (5 < $n <= 7): > $f = 2; > break; > case (8 < $n <= 12): > $f = 3; > break; > default: > $f = 4; > break; > } I'm certain that

Re: [PHP] help out a noob w/ include & switch?

2005-09-20 Thread Robert Cummings
On Tue, 2005-09-20 at 19:41, jt wrote: > Thanks Thorsten and Rob, > Sry my bogus code was error filled. This is not the case with the > actual > code. I was a little quick in removing the large amounts of text that are > actually contained in the cases and "case 1,2,3:" is just to say ther

Re: [PHP] professional code quick tip

2005-09-20 Thread Thorsten Suckow-Homberg
in other languages it is possible use conditional epression in switch case like switch $n case (0 You could use the following statement: -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] help out a noob w/ include & switch?

2005-09-20 Thread jt
Thanks Thorsten and Rob, Sry my bogus code was error filled. This is not the case with the actual code. I was a little quick in removing the large amounts of text that are actually contained in the cases and "case 1,2,3:" is just to say there are many more cases. Could this be a problem

Re: [PHP] professional code quick tip

2005-09-20 Thread Robert Cummings
On Tue, 2005-09-20 at 19:20, adriano ghezzi wrote: > hy guys this night I'm quite tired > > I need a little tip > > ok var n could be from 0 to 12 > > var f must be set > f=1 if0 f=2 if 5 f=3 if 8 f=4 if n>12 > > due to my fatigue I coded four if-if else statement, > > in other langu

[PHP] professional code quick tip

2005-09-20 Thread adriano ghezzi
hy guys this night I'm quite tired I need a little tip ok var n could be from 0 to 12 var f must be set f=1 if012 due to my fatigue I coded four if-if else statement, in other languages it is possible use conditional epression in switch case like switch $n case (0http://www.php.net/)

Re: [PHP] help out a noob w/ include & switch?

2005-09-20 Thread Robert Cummings
On Tue, 2005-09-20 at 19:14, Thorsten Suckow-Homberg wrote: > > Hi All, > >My very first post to this group as I'm a freshly spanked new born > > php > > baby. Hope I have the correct stop for noob tech questions. > Welcome :) > > > [source] > > First guess: On your "live" server the ini

Re: [PHP] help out a noob w/ include & switch?

2005-09-20 Thread Jasper Bryant-Greene
jay thompson wrote: index.php: There is no need to switch in and out of PHP there. Replace all the ?> immediately followed by content.php: some text some more text - artist name'; break; case artist2,3,4: [...]

Re: [PHP] help out a noob w/ include & switch?

2005-09-20 Thread Thorsten Suckow-Homberg
Hi All, My very first post to this group as I'm a freshly spanked new born php baby. Hope I have the correct stop for noob tech questions. Welcome :) [source] First guess: On your "live" server the ini-value error_reporting is switched to report anything but notices and warnings or

[PHP] Re: help out a noob w/ include & switch?

2005-09-20 Thread Ben
jay thompson said the following on 09/20/05 15:41: > My problem occurs only on the server (NT 5 b.2195, PHP 4.3.10, IIS 5.0) but > works great on my dev rig (XAMPP 1.4.15, VectorLinux). At first guess I'd say register globals is on for your test rig and off for your server. Since your variables

Re: [PHP] BOOKING SYSTEM

2005-09-20 Thread adriano ghezzi
well I did it in the past, at the end after a lot of tests and simulation i decided for warehouse table id_hotel, date, num_total_rooms, num_booked_rooms this is day by day handling it is really flexible you can satisfy each kind of request with very simple queries you also gain more flexibility

Re: [PHP] help out a noob w/ include & switch?

2005-09-20 Thread Robert Cummings
On Tue, 2005-09-20 at 18:41, jay thompson wrote: > Hi All, > My very first post to this group as I'm a freshly spanked new born php > baby. Hope I have the correct stop for noob tech questions. Please > [-- SNP --] Try verifying your include path in php.ini for the NT version.

[PHP] help out a noob w/ include & switch?

2005-09-20 Thread jay thompson
Hi All, My very first post to this group as I'm a freshly spanked new born php baby. Hope I have the correct stop for noob tech questions. Please re-direct me if I have it wrong. I've been doing web dev for a quite while with a variety of methods (html, xhtml/css, cfml, flash/as, on and on.

Re: [PHP] Chat module

2005-09-20 Thread adriano ghezzi
should be not too difficult to setup using a couple of web pages running on localhost e socket hope help 2005/9/20, Vinicius Mapelli Schmaedek <[EMAIL PROTECTED]>: > Somebody knows a chat module to be used for conversation between only > two people? > > PS: sorry, my english is not very good

Re: [PHP] specifying a font in PHP-generated email

2005-09-20 Thread Richard Davey
Hello Kenn, Tuesday, September 20, 2005, 9:32:47 PM, you wrote: > I'm attempting to create an HTML email via PHP and cannot get the > email to render in the correct font. I've made several stabs at it, > the most recent one below. The same code that works just fine on a > web page won't work for

Re: [PHP] Php logging into online bank to get details automatically

2005-09-20 Thread Jasper Bryant-Greene
John Nichel wrote: I. Gray wrote: I thought I may of read of this somewhere- but I may be wrong. I am also not sure whether this is allowed by banks, so please let me know- I want to stay on the right side of the law! Your account...I can't see where it would be a problem with how you access

RE: [PHP] Re: Suggestions for class design

2005-09-20 Thread Chris W. Parker
Murray @ PlanetThoughtful on Tuesday, September 20, 2005 8:15 AM said: > And it's also worth mentioning at this point that it might present > more of a challenge to the original poster to implement and make use > of a complex data abstraction package [1] than to lear

[PHP] Chat module

2005-09-20 Thread Vinicius Mapelli Schmaedek
Somebody knows a chat module to be used for conversation between only two people? PS: sorry, my english is not very good :P -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Suggestions for class design

2005-09-20 Thread Chris W. Parker
Sorry I've been so quiet on this topic since I started it but I've basically been overwhelmed with information! :) I was hoping the answer(s) would be a lot more plain and simple than it(they) has been so I could get to implementing some things right away. But I'm afraid it's going to take me longe

Re: [PHP] Php logging into online bank to get details automatically

2005-09-20 Thread I. Gray
Curl- ahh, thanks not something I've looked into yet. Are there any other resources out there that I could look at for learning about it? Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Re: Suggestions for class design

2005-09-20 Thread Michael Sims
Murray @ PlanetThoughtful wrote: > My post was not aimed at saying 'using packaged approaches to solve > coding problems is bad', but to say 'the original poster is asking a > fundamental learning question, so a packaged approach will possibly, > maybe even probably, hamper his development as a pro

Re: [PHP] Php logging into online bank to get details automatically

2005-09-20 Thread John Nichel
I. Gray wrote: Hi all. I thought I may of read of this somewhere- but I may be wrong. I am also not sure whether this is allowed by banks, so please let me know- I want to stay on the right side of the law! Your account...I can't see where it would be a problem with how you access it. I'd

[PHP] specifying a font in PHP-generated email

2005-09-20 Thread Kenn
Greetings. I'm attempting to create an HTML email via PHP and cannot get the email to render in the correct font. I've made several stabs at it, the most recent one below. The same code that works just fine on a web page won't work for me here. What am I doing wrong? Any and all help apprecia

RE: [PHP] Re: Suggestions for class design

2005-09-20 Thread Murray @ PlanetThoughtful
> > This is not to trivialize your Metastorage project (or, to be more > > accurate, I know nothing about it, so it's not my place to trivialize > > it or otherwise), but to point out that 'out-of-the-box' solutions to > > fundamental coding development problems probably ultimately makes for > > a

RE: [PHP] Re: Suggestions for class design

2005-09-20 Thread Murray @ PlanetThoughtful
[snippage] > I do not understand why this could bother you or anybody else. If you > have a better solution, nothing stops you to make your recommendations. Hi Manuel, I did make my recommendation. To you. It went something like (and I'm paraphrasing), "Your proposed solution doesn't solve the o

RE: [PHP] Tidying code for PHP5.0.5/PHP4.4.0

2005-09-20 Thread Murray @ PlanetThoughtful
> Jochem Maas wrote: > > Michael Sims wrote: > >> So, as far as foo() knows: > >> > >> foo($a = 5); > >> and > >> foo(5); > >> > >> are exactly the same... > > > > I don't think they are, and you're examples don't prove it. > > Anyone care to come up with the proof. > > No, I was wrong, Rasmus cor

[PHP] Php logging into online bank to get details automatically

2005-09-20 Thread I. Gray
Hi all. I thought I may of read of this somewhere- but I may be wrong. I am also not sure whether this is allowed by banks, so please let me know- I want to stay on the right side of the law! I'd like a php script to access my bank balances and send me an email daily. I know how to set up cron a

RE: [PHP] Tidying code for PHP5.0.5/PHP4.4.0

2005-09-20 Thread Michael Sims
Jochem Maas wrote: > Michael Sims wrote: >> So, as far as foo() knows: >> >> foo($a = 5); >> and >> foo(5); >> >> are exactly the same... > > I don't think they are, and you're examples don't prove it. > Anyone care to come up with the proof. No, I was wrong, Rasmus corrected me. That's my on

[PHP] BOOKING SYSTEM

2005-09-20 Thread php @ net mines
Hi all I have a hotel booking system where for sppecific periods we have specific availability e.g. hotel_id, hotel_name, hotel_fromperiod, hotel_toperiod, hotel_availablesinglerooms 1, Hilton, 20/06/05, 20/08/05, 20 We have a second table for recording the bookings e.g.hotel1_id, hotel1_n

[PHP] Re: user can post items while outhers cannot?

2005-09-20 Thread James Benson
Probably your code, changes were made in the newer versions of PHP which make some older scripts unusable, register globals for instance, do you have the PHP.ini settings to show errors turned on, you should, if you post the code snippet someone will probably be able tell whether its the code o

[PHP] [RELEASE ANNOUNCEMENT] PEAR 1.4.0 provides revolution in PHP installation

2005-09-20 Thread Greg Beaver
September 20, 2005 FOR IMMEDIATE RELEASE Contact: Gregory Beaver ([EMAIL PROTECTED]) As of Sunday, September 18, 2005, the PEAR installer has reached maturity as an enterprise-level installation tool for PHP code. The release of version 1.4.0 stable ushers in several essential features for manage

Re: [PHP] comparing dates

2005-09-20 Thread Philip Hallstrom
Is there a quick way to compare dates in the format dd/mm/yy without exploding and comparing the individual parts? Compare them in what way? Before, after, days between? In any case, i'd look at strtotime() to convert them into timestamps, then diff them to get the number of seconds b/n them,

Re: [PHP] Fwd: Code Optimization Help

2005-09-20 Thread Joseph Crawford
Ok so finally i implemented my logging class into my mail merge object, this is the results Word -> Application Opened. Word -> Document1 Document Added. Word -> header.doc Document Saved. Word -> header.doc Document Closed. Word -> Document2 Document Added. Word -> ds.doc Document Saved. Word ->

Re: [PHP] Tidying code for PHP5.0.5/PHP4.4.0

2005-09-20 Thread Jochem Maas
Michael Sims wrote: Jochem Maas wrote: foo($a = 5); by definition the expression is evaluated _before_ the function is called - so the expression is not passed to the function, the result of the expression is passed ... I was under the impression that the the expression evaluates to a 'pointe

Re: [PHP] core files

2005-09-20 Thread Jochem Maas
Jon wrote: OK, OK, Ha-ha Thought that you guys could read my mind... no this is php-generals not php-psychics - easy mistake to make tho ;-) glad to see you can take a little stick :-) you'll do well here ;-) to start with, it will probably help to track down the problem if you turn off safe

RE: [PHP] Tidying code for PHP5.0.5/PHP4.4.0

2005-09-20 Thread Michael Sims
Rasmus Lerdorf wrote: > Michael Sims wrote: >> When used as an expression, an assignment evaluates to whatever is >> on the right side of the assignment operator, not the left. >> Example: [...] >> foo($a = 5); >> and >> foo(5); >> >> are exactly the same... > > The value passed is the same, b

Re: [PHP] Tidying code for PHP5.0.5/PHP4.4.0

2005-09-20 Thread Rasmus Lerdorf
Michael Sims wrote: > Jochem Maas wrote: > foo($a = 5); >> >>by definition the expression is evaluated _before_ the function is >>called - so the expression is not passed to the function, the result >>of the expression is passed ... I was under the impression that the >>the expression evaluate

Re: [PHP] Tidying code for PHP5.0.5/PHP4.4.0

2005-09-20 Thread Rasmus Lerdorf
Lester Caine wrote: > This type of code is used in a few places, so I'd like a little help > converting it to 'good code' under the new rules ;) > > Get the key from an array ( fails because key(&array) ) > > if( $pId == key( $this->getFunc() ) ) { > > In getFunc() > > return ( $this->g

Re: [PHP] Installing under IIS6.0

2005-09-20 Thread Dan Trainor
Jay Blanchard wrote: > [snip] > However, this really isn't what I'm looking for. I'm simply looking for > a way to parse PHP code from within existing HTML pages, so that I can > migrate a site from Apache to IIS6.0. > > Like I said, if I were using Apache, I would just add .html to my > AddTy

Re: [PHP] imap_open

2005-09-20 Thread Joachim Person
Further, when changing the imap_open line in the script to $mbox = imap_open("{imap.liu.se:993/imap/ssl}", "joape382", "fiol"); (I added the /imap/ssl part) I immediately got the following response: Warning: imap_open(): Couldn't open stream {imap.liu.se:993/imap/ssl} in c:\inetpub\wwwroot\Tes

Re: [PHP] imap_open

2005-09-20 Thread Joachim Person
Just want to say that telnet imap.liu.se 993 works just fine (the port for secure communication). But then the command prompt starts to look strange. I cannot see when I'm typing (perhaps it has to do with the secure communication link?!). Where do I go from here? It still doesn't work with th

Re: [PHP] Tidying code for PHP5.0.5/PHP4.4.0

2005-09-20 Thread Jochem Maas
thanks everyone for the crash course in better understanding the underlying mechanisms! ... I'm probably not the only one that learnt something from this ;-) Dragan Stanojevic - Nevidljivi wrote: Jochem Maas wrote: Basically, in PHP, a reference (such as what key() takes as a parameter [1]) c

Re: [PHP] imap_open

2005-09-20 Thread Joachim Person
Thanks Viraj, Telneting gives an error like this (translated from Swedish language): Connecting to imap.liu.se...Couldn't connect to the host computer, using port 143: The connection failed. I guess I'm not getting any answer then. Regards, Joachim "viraj" <[EMAIL PROTECTED]> skrev i meddelan

Re: [PHP] Tidying code for PHP5.0.5/PHP4.4.0

2005-09-20 Thread Dragan Stanojevic - Nevidljivi
Jochem Maas wrote: Basically, in PHP, a reference (such as what key() takes as a parameter [1]) can only point to an actual variable, not directly to the result of a function. So you have to assign the output of the function to a variable first. wtf, Im now officially confused (before I suffer

[PHP] [RELEASE ANNOUNCEMENT] PEAR 1.4.0 provides revolution in PHP installation

2005-09-20 Thread Greg Beaver
September 20, 2005 FOR IMMEDIATE RELEASE Contact: Gregory Beaver ([EMAIL PROTECTED]) As of Sunday, September 18, 2005, the PEAR installer has reached maturity as an enterprise-level installation tool for PHP code. The release of version 1.4.0 stable ushers in several essential features for manage

Re: [PHP] resource id#

2005-09-20 Thread John Nichel
Ross wrote: When I try to insert a field into my database it shows as Resource id#21? I must be doing something dim. Right after you try to do the insert, echo out mysql_error() -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php

Re: [PHP] Easy question - delete strings from the beginning of space...

2005-09-20 Thread Jordan Miller
to get rid of potential double spaces after the explode, you could do: foreach ($words as $word) { if (!empty($word)) { $first = $word; break; } } echo $first; This will always return the first word. Jordan On Sep 20, 2005, at 7:24 AM, Jochem Maas wrote: how much eas

[PHP] comparing dates

2005-09-20 Thread Ross
Is there a quick way to compare dates in the format dd/mm/yy without exploding and comparing the individual parts? R. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Suggestions for class design

2005-09-20 Thread Manuel Lemos
Hello, on 09/20/2005 04:59 AM Murray @ PlanetThoughtful said the following: Let's take for example a class called 'Customer' that (obviously) manipulates customers in the database. Here is a very basic Customer class. (Data validation and the like are left out for brevity.) This is a basic obje

RE: [PHP] Is my feedback form being successfully abused?

2005-09-20 Thread Chris W. Parker
Jochem Maas on Tuesday, September 20, 2005 2:37 AM said: > this 'fairly recent' class of attack is already quite well documented, > google around for more info. Actually I did do some googling on it before posting and was relatively confident that the attempt to exp

[PHP] Re: core files [Oops]

2005-09-20 Thread Jon
Nevermind. I get the award for not checking code on this one. I did not pay close enough attention to what I was doing and had the path with \'s instead of /'s. I fixed that and it started working. Imagine that. Buggy code was causing the error. Sorry for the trouble. ""Jon"" <[EMAIL PROTECTED

RE: [PHP] Tidying code for PHP5.0.5/PHP4.4.0

2005-09-20 Thread Michael Sims
Jochem Maas wrote: >>> foo($a = 5); > > by definition the expression is evaluated _before_ the function is > called - so the expression is not passed to the function, the result > of the expression is passed ... I was under the impression that the > the expression evaluates to a 'pointer' (I'm sur

Re: [PHP] resource id#

2005-09-20 Thread Thorsten Suckow-Homberg
When I try to insert a field into my database it shows as Resource id#21? I must be doing something dim. Some could would definetely help here... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] re: resource id #

2005-09-20 Thread Thorsten Suckow-Homberg
I was using the variable $link in a form. is it a reserved word or something?? Most likely the var $link is being used for db-operations (or similiar) previously, thus the return value of any resource-based operation is passed to the var $link. Check the all the scripts that are involved in pr

[PHP] re: resource id #

2005-09-20 Thread Ross
I was using the variable $link in a form. is it a reserved word or something?? R. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] session 2

2005-09-20 Thread John Nichel
Roman Duriancik wrote: Tanks all for help about session I have other question. In php.ini I set folder for sessions file on c:\tmp but what are happens when disk is full, how to automatically delete nonactive sessions files ? PHP will handle this automatically based on the session.gc_maxlifeti

[PHP] session 2

2005-09-20 Thread Roman Duriancik
Tanks all for help about session I have other question. In php.ini I set folder for sessions file on c:\tmp but what are happens when disk is full, how to automatically delete nonactive sessions files ? thanks roman -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http:/

Re: [PHP] Fwd: Code Optimization Help

2005-09-20 Thread Jochem Maas
Joseph Crawford wrote: Jochem, I did attempt what you wanted me to try, however when i did that it just hung up on the OpenHeaders $this->obj->ActiveDocument->MailMerge->OpenHeaderSource($this->mm_data_dir.'/header.doc'); maybe your Close() function should be different?: private function C

[PHP] Re: resource id#

2005-09-20 Thread David Robley
Ross wrote: > When I try to insert a field into my database it shows as Resource id#21? > > I must be doing something dim. Indeed you are; perhaps if you show a code snippet someone can guide you to the light :-) Cheers -- David Robley Do not believe in miracles -- rely on them. -- PHP Ge

[PHP] resource id#

2005-09-20 Thread Ross
When I try to insert a field into my database it shows as Resource id#21? I must be doing something dim. R. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] resource id#

2005-09-20 Thread Ross
When I try to insert a field into my database it shows as Resource id#21? I must be doing something dim. R. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] core files

2005-09-20 Thread Jon
OK, OK, Ha-ha Thought that you guys could read my mind... Here is the error Warning: fopen(C:\windows\Desktop\php\php pages\phpout.txt) [function.fopen]: failed to open stream: No such file or directory in C:\windows\Desktop\php\php pages\phpout.txt on line 12 and of course the fwrite and fclose

[PHP] Re: session

2005-09-20 Thread Mark Evans
how to do it ? http://php.grn.es/manual/en/ref.session.php Hint: Look at example 1 where it says link Also take a look at http://php.grn.es/manual/en/function.session-register.php Note: the part about not using session_register() Regards Mark -- PHP General Mailing List (http://www.php

[PHP] session

2005-09-20 Thread Roman Duriancik
Hello, I'm novice in using sessions and therefore I need some help. link and when i click on link always I have in $count value 1 but I need value 2,3, how to do it ? thanks roman -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: session

2005-09-20 Thread Norbert Wenzel
Roman Duriancik wrote: link and when i click on link always I have in $count value 1 but I need value 2,3, how to do it ? i think this is what you asked for: if(isset($_SESSION['count'])) { $_SESSION['count']++; } else { $_SESSION['count'] = 1; } -- PHP General Mailing L

Re: [PHP] session

2005-09-20 Thread Thorsten Suckow-Homberg
and when i click on link always I have in $count value 1 but I need value 2,3, how to do it ? //session_destroy(); <- don't do that! It destroys the //session associated with the current user ?> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/u

[PHP] session

2005-09-20 Thread Roman Duriancik
Hello, I'm novice in using sessions and therefore I need some help. link and when i click on link always I have in $count value 1 but I need value 2,3, how to do it ? thanks roman . -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Fwd: Code Optimization Help

2005-09-20 Thread Jochem Maas
Joseph Crawford wrote: I am not sure where you got the idea that it is creating an instance of word I got the idea from your code, but I just gave it a quick glance... that said you instantiate a new COM object in at least 3 places... CreateHeader() CreateDataSource() CreateDocument() which y

Re: [PHP] Re: Suggestions for class design

2005-09-20 Thread Jochem Maas
Michael Sims wrote: Murray @ PlanetThoughtful wrote: Once he understands how to solve class abstraction problems such as the one he is asking about, he will be better equipped to deal with a wider range of application development tasks. I agree with this. This is not to trivialize your Me

Fw: [PHP] Easy question - delete strings from the beginning of space...

2005-09-20 Thread Gustav Wiberg
- Original Message - From: "Gustav Wiberg" <[EMAIL PROTECTED]> To: "Jochem Maas" <[EMAIL PROTECTED]> Cc: "PHP General" Sent: Tuesday, September 20, 2005 3:04 PM Subject: Re: [PHP] Easy question - delete strings from the beginning of space... - Original Message - From: "Joche

Re: [PHP] Easy question - delete strings from the beginning of space...

2005-09-20 Thread Gustav Wiberg
- Original Message - From: "Jochem Maas" <[EMAIL PROTECTED]> To: "Gustav Wiberg" <[EMAIL PROTECTED]> Cc: "PHP General" Sent: Tuesday, September 20, 2005 2:24 PM Subject: Re: [PHP] Easy question - delete strings from the beginning of space... Gustav Wiberg wrote: Hi there! I guess

RE: [PHP] Re: Suggestions for class design

2005-09-20 Thread Michael Sims
Murray @ PlanetThoughtful wrote: > Once he understands how to solve class abstraction problems such as > the one he is asking about, he will be better equipped to deal with a > wider range of application development tasks. I agree with this. > This is not to trivialize your Metastorage project (o

RE: [PHP] It's A Windows World

2005-09-20 Thread Jay Blanchard
[snip] >>http://news.netcraft.com/archives/web_server_survey.html force be with you in the new job Jay. :-) [/snip] Thanks Jochem! Now, of course, I didn't mean that the world (generalization) was a Windows one, but just my local world. I am working towards some things that will allow the transi

Re: [PHP] Fwd: Code Optimization Help

2005-09-20 Thread Joseph Crawford
I am not sure where you got the idea that it is creating an instance of word for every record, but it creates one instance then loops through the records using that one instance. On 9/20/05, Jochem Maas <[EMAIL PROTECTED]> wrote: > > Joseph Crawford wrote: > > Hello Everyone, > > > > I have som

Re: [PHP] It's A Windows World

2005-09-20 Thread Jochem Maas
Robert Cummings wrote: On Sun, 2005-09-18 at 03:18, viraj wrote: no! it's not a Windows World anymore.. ;-) http://news.netcraft.com/archives/web_server_survey.html As much as I dislike Microsoft and its practices I bring bad news. The above only indicates that it's not an IIS world. t

Re: [PHP] Easy question - delete strings from the beginning of space...

2005-09-20 Thread Jochem Maas
Gustav Wiberg wrote: Hi there! I guess this is an easy question. I have string... "Hello you" and I want to get the "Hello" part. How do I do that? (I can of course search for first occurence of space and then use substr, but I guess there is an easier solution? how much easier do you want

  1   2   >