[PHP] Re: Best practices for deleting and restoring records - moving vs flagging

2005-08-11 Thread Arno Coetzee
Saqib Ali wrote: Hello All, What are best practices for deleting records in a DB. We need the ability to restore the records. Two obvious choices are: 1) Flag them deleted or undeleted 2) Move the deleted records to seperate table for deleted records. We have a complex schema. However the t

Re: [PHP] PHP and Active Directory

2005-08-11 Thread Esteamedpw
Is this something you're looking for? _http://www.phpfreaks.com/scripts/User_Authentication/16.php_ (http://www.phpfreaks.com/scripts/User_Authentication/16.php)

Re: [PHP] Best practices for deleting and restoring records - moving vs flagging

2005-08-11 Thread James Kaufman
On Thu, Aug 11, 2005 at 10:47:09AM -0700, Saqib Ali wrote: > Hello All, > > What are best practices for deleting records in a DB. We need the > ability to restore the records. > > Two obvious choices are: > > 1) Flag them deleted or undeleted > 2) Move the deleted records to seperate table for d

Re: [PHP] CPU Usage

2005-08-11 Thread kalinga
with php you can simply create your own system monitoring classes using php snmp functions. mrtg (http://mrtg.org) uses SNMP to manipulate system MIBs and OIDs to retreave device informations. happy PHP SNMP! ~viraj. On 8/12/05, Evert | Rooftop <[EMAIL PROTECTED]> wrote: > Hi All, > > Is ther

Re: [PHP] Getting average down to 5

2005-08-11 Thread Sebastian
Ryan A wrote: Hey, Having a bit of a problem working out the logic to this one (its 5am now...), basically people vote on pics like hotornot.com, but here they vote on a scale of 1-5 (one being something like what was hit by a bus at birth and five being the person you will never have a chance

[PHP] Getting average down to 5

2005-08-11 Thread Ryan A
Hey, Having a bit of a problem working out the logic to this one (its 5am now...), basically people vote on pics like hotornot.com, but here they vote on a scale of 1-5 (one being something like what was hit by a bus at birth and five being the person you will never have a chance to have children

[PHP] Re: PHP & smarty - nested queries and arrays

2005-08-11 Thread mikespook
Warning: Smarty error: unable to read resource: "welcome/Object.tpl" in /usr/local/lib/php/Smarty/Smarty.class.php on line 1088 You should check your Smarty`s template_dir. Put the templates into the template_dir, then the Smarty will find them. Like this: $smarty = new Smarty(); $smarty->templ

[PHP] Tip for 'New People'/Beginners/Noobs [was] Re: [PHP] PHP & smarty - nested queries and arrays

2005-08-11 Thread Jochem Maas
Amanda Hemmerich wrote: What is cross posting? when you post the same question to more than one mailing list (especially when done at the same time). alot of the people who regularly read/post on php-generals also watch other php related mailing lists (I for one am also subscribed to the Smart

Re: [PHP] making checkbox's and radio buttons sticky

2005-08-11 Thread Jochem Maas
zedleon wrote: I am new to php and am in need of some guidance I am building a sticky form and am having trouble bringing in the data sticky as in honey? fields for checkbox's and radio button's. Any help on how to do this would be appreciated HTML form sample PHP am I on the right trac

Re: [PHP] Blatantly Evil Question

2005-08-11 Thread Jochem Maas
Jasper Bryant-Greene wrote: Jochem Maas wrote: Jasper Bryant-Greene wrote: robots.txt will not do what you want it to. Just sniff for those robots' User-Agents (Google, MSN and Yahoo all publish their UA strings on their websites, AFAIK) and send different content if it's one of those.

Re: [PHP] Blatantly Evil Question

2005-08-11 Thread Jasper Bryant-Greene
Evert | Collab wrote: Lets just put it this way: if you don't want your site indexed, use robots.txt if you want to hide your site from search engines [ which won't even touch your files if you use robots.txt ] check the UA string. I can't imagine a situation where you want to hide your conte

Re: [PHP] Blatantly Evil Question

2005-08-11 Thread Matthew Weier O'Phinney
* Brian Dunning <[EMAIL PROTECTED]> : > On Aug 11, 2005, at 4:06 PM, Evert | Collab wrote: > > > First hit on google: > > http://www.searchengineworld.com/robots/robots_tutorial.htm > > Search engines check for a robots.txt on your site, in the > > robots.txt file you can specify that certain or

Re: [PHP] Blatantly Evil Question

2005-08-11 Thread Jochem Maas
Philip Hallstrom wrote: robots.txt will not do what you want it to. Just sniff for those robots' User-Agents (Google, MSN and Yahoo all publish their UA strings on their websites, AFAIK) and send different content if it's one of those. they will hammer you for it eventually - AFAICT all maj

Re: [PHP] Blatantly Evil Question

2005-08-11 Thread Philip Hallstrom
robots.txt will not do what you want it to. Just sniff for those robots' User-Agents (Google, MSN and Yahoo all publish their UA strings on their websites, AFAIK) and send different content if it's one of those. they will hammer you for it eventually - AFAICT all major SEs send out their spid

Re: [PHP] Blatantly Evil Question

2005-08-11 Thread Jasper Bryant-Greene
Jochem Maas wrote: Jasper Bryant-Greene wrote: robots.txt will not do what you want it to. Just sniff for those robots' User-Agents (Google, MSN and Yahoo all publish their UA strings on their websites, AFAIK) and send different content if it's one of those. they will hammer you for it eve

Re: [PHP] Blatantly Evil Question

2005-08-11 Thread Jochem Maas
Jasper Bryant-Greene wrote: Brian Dunning wrote: On Aug 11, 2005, at 3:44 PM, Evert | Collab wrote: Use robots.txt 'evil' searchengines will spoof the user-agent string anyway Can you be more specific about what you mean by "use robots.txt"? I just want to cloak for Google, MSN, and Yaho

Re: [PHP] PHP and Active Directory

2005-08-11 Thread Jochem Maas
Jay Blanchard wrote: [snip] "Yes, i have php to authenticate against AD, and i can say that is easy/hard. I make it work using LDAP (http://www.php.net/ldap)" [/snip] If that is what you were expecting you didn't read my original reply... [quote] Are you, at all, familiar with TFM? Jay, in H

RE: [PHP] IP & Geographical

2005-08-11 Thread Rob Agar
PEAR::Net_GeoIP is nice.. $geoip = Net_GeoIP::getInstance('/path/to/geoip.dat', Net_GeoIP::MEMORY_CACHE); $countryName = $geoip->lookupCountryName($ipAddress); http://pear.php.net/package/Net_GeoIP Rob > -Original Message- > From: John Taylor-Johnston [mailto:[EMAIL PROTECTED] > Sent:

Re: [PHP] PHP & smarty - nested queries and arrays

2005-08-11 Thread Jochem Maas
Amanda Hemmerich wrote: Hello! I'm using PHP and Smarty to try to build an array of arrays using the results from nested queries. I am just learning about nested arrays, and I'm not sure what I'm doing wrong. ... Can anyone point me in the right direction? Amanda please don't cross-pos

Re: [PHP] Blatantly Evil Question

2005-08-11 Thread Jasper Bryant-Greene
Brian Dunning wrote: On Aug 11, 2005, at 3:44 PM, Evert | Collab wrote: Use robots.txt 'evil' searchengines will spoof the user-agent string anyway Can you be more specific about what you mean by "use robots.txt"? I just want to cloak for Google, MSN, and Yahoo. I couldn't care less about

Re: [PHP] Blatantly Evil Question

2005-08-11 Thread Brian Dunning
On Aug 11, 2005, at 4:06 PM, Evert | Collab wrote: First hit on google: http://www.searchengineworld.com/robots/robots_tutorial.htm Search engines check for a robots.txt on your site, in the robots.txt file you can specify that certain or all search engines shouldn't index your site I know

Re: [PHP] Blatantly Evil Question

2005-08-11 Thread Brian Dunning
On Aug 11, 2005, at 3:44 PM, Evert | Collab wrote: Use robots.txt 'evil' searchengines will spoof the user-agent string anyway Can you be more specific about what you mean by "use robots.txt"? I just want to cloak for Google, MSN, and Yahoo. I couldn't care less about what any other search

[PHP] Blatantly Evil Question

2005-08-11 Thread Brian Dunning
What is the best way to cloak a site - send search engines different content than real users? Yes, I know it's bad practice, and I know the domain will eventually be banned. I've found lots of different methods including huge tables of all the possible client types sent by various spiders.

[PHP] Re: PHP & smarty - nested queries and arrays

2005-08-11 Thread Matthew Weier O'Phinney
* Amanda Hemmerich <[EMAIL PROTECTED]>: > I'm using PHP and Smarty to try to build an array of arrays using the > results from nested queries. I am just learning about nested arrays, > and I'm not sure what I'm doing wrong. > > I am hoping someone can give me a hint as to what I am doing wrong

[PHP] Re: PHP, SSL and private keys

2005-08-11 Thread Manuel Lemos
Hello, on 08/11/2005 04:04 PM Evert | Rooftop said the following: I would like to give my users the possibility to authenticate through a private certificate to confirm their identity. I'm not really sure where to start. Has anyone seen a website explaining this? Some pointers would be very welc

Re: [PHP] CPU Usage

2005-08-11 Thread Patrick - Jupiter Hosting
Actually, yes there is :) Do a google for phpsysinfo - that's exactly what you want, I guarantee it :) Patrick On Thu, 2005-08-11 at 22:22 +0200, Evert | Rooftop wrote: > Hi All, > > Is there a way to determine the current cpu usage using PHP. I'm mainly > looking for a linux solution, but

Re: [PHP] PHP and Active Directory

2005-08-11 Thread xfedex
> Just to clearify what you're trying to do. Maybe LDAP (or the ADLDAP? > suggestion) isn't what you need. > > Are you trying to have a user type their username and password into a web > form and have PHP pass that information to an active directory server? Or > are you trying to make sure th

RE: [PHP] PHP and Active Directory

2005-08-11 Thread Jay Blanchard
[snip] "Yes, i have php to authenticate against AD, and i can say that is easy/hard. I make it work using LDAP (http://www.php.net/ldap)" [/snip] If that is what you were expecting you didn't read my original reply... [quote] Are you, at all, familiar with TFM? http://www.php.net/ldap [/quote]

Re: [PHP] PHP and Active Directory

2005-08-11 Thread xfedex
> My non-sense answers pointed you to the LDAP functions for use with > Active Directory. That is very constructive until you ask for something > more specific. Jay, I was specting something like: "Yes, i have php to authenticate against AD, and i can say that is easy/hard. I make it work using

Re: [PHP] PHP and Active Directory

2005-08-11 Thread tg-php
Just to clearify what you're trying to do. Maybe LDAP (or the ADLDAP? suggestion) isn't what you need. Are you trying to have a user type their username and password into a web form and have PHP pass that information to an active directory server? Or are you trying to make sure that the user

Re: [PHP] graph - dowloads/hr

2005-08-11 Thread Sebastian
Richard Lynch wrote: On Tue, August 9, 2005 3:07 pm, Sebastian wrote: i'd like to create a graph with the amount of downloads per hour, i am a little confused how i should go about this. i know i can use rrdtool/mrtg, but im looking for more 'user friendly' graphs with custom colors,etc. e

RE: [PHP] PHP and Active Directory

2005-08-11 Thread Jay Blanchard
[snip] So, if you dont have any 'constructive' comment, suggestion or experience, please dont reply. English (as you can read) is no my native language, so I lost a lot of (precious) time repling your non-sense answers. [/snip] My non-sense answers pointed you to the LDAP functions for use with A

Re: [PHP] PHP and Active Directory

2005-08-11 Thread John Nichel
xfedex wrote: Welcome to /dev/null I hope you enjoy your stay. -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] CPU Usage

2005-08-11 Thread Evert | Rooftop
Hi All, Is there a way to determine the current cpu usage using PHP. I'm mainly looking for a linux solution, but I would like to expand it to windows later on. Any ideas? The archives weren't any good =( Thanks, Evert -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: ht

Re: [PHP] Re: possible bug (string equality to zero)?

2005-08-11 Thread tg-php
Using === should work. This is most likely because, if I remember correctly, when you compare a string to a integer, it essentially does an intval(string). If the string contains no numbers, you end up with nothing.. or zero. It definitely isn't a bug and definitely has to do with type conver

Re: [PHP] PHP and Active Directory

2005-08-11 Thread xfedex
> [snip] > Sorry, dont have time for this right now...Anyway, thanks for your > answer! > [/snip] > > You don't have time to read the manual? > Jay, maybe this way you can understand my first question: IF (have you been able to make PHP to authenticate against AD) { echo $comments; //Only

Re: [PHP] PHP and Active Directory

2005-08-11 Thread John Nichel
xfedex wrote: [snip] Are you, at all, familiar with TFM? TFM?.m no, can you tell me where to start? [/snip] You can start by RTFM and STFW and STFA. I gave you a link in the last e-mail. Here is another... http://catb.org/~esr/faqs/smart-questions.html Sorry, dont have time for

RE: [PHP] PHP and Active Directory

2005-08-11 Thread Jay Blanchard
[snip] Sorry, dont have time for this right now...Anyway, thanks for your answer! [/snip] You don't have time to read the manual? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] making checkbox's and radio buttons sticky

2005-08-11 Thread zedleon
I am new to php and am in need of some guidance I am building a sticky form and am having trouble bringing in the data fields for checkbox's and radio button's. Any help on how to do this would be appreciated HTML form sample PHP am I on the right track here? zed -- PHP General Mailing Lis

Re: [PHP] PHP and Active Directory

2005-08-11 Thread xfedex
> [snip] > > Are you, at all, familiar with TFM? > > > > TFM?.m no, can you tell me where to start? > [/snip] > > You can start by RTFM and STFW and STFA. I gave you a link in the last > e-mail. Here is another... > > http://catb.org/~esr/faqs/smart-questions.html > Sorry, dont have ti

RE: [PHP] PHP and Active Directory

2005-08-11 Thread Jay Blanchard
[snip] > Are you, at all, familiar with TFM? > TFM?.m no, can you tell me where to start? [/snip] You can start by RTFM and STFW and STFA. I gave you a link in the last e-mail. Here is another... http://catb.org/~esr/faqs/smart-questions.html -- PHP General Mailing List (http://www.php

Re: [PHP] PHP and Active Directory

2005-08-11 Thread xfedex
> [snip] > Have someone make PHP to authenticate against AD? > Any comment, suggestion will be greatly appreciated. > [/snip] > > Are you, at all, familiar with TFM? > TFM?.m no, can you tell me where to start? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: htt

Re: [PHP] Oracle Question

2005-08-11 Thread Joseph Oaks
xfedex, yes you can connect to a remote Oracle DB, I'm doing for an app I'm trying to write. You have to configure php with the oracle version you have, more than likely with the --with-oci8=/u1/oracle/product/10g line, of course your oracle location will differ. I chose to use the PEAR::DB to do

[PHP] PHP, SSL and private keys

2005-08-11 Thread Evert | Rooftop
Hi, I would like to give my users the possibility to authenticate through a private certificate to confirm their identity. I'm not really sure where to start. Has anyone seen a website explaining this? Some pointers would be very welcome. Thanks! Evert -- PHP General Mailing List (http://www.ph

Re: [PHP] Re: possible bug (string equality to zero)?

2005-08-11 Thread Philip Hallstrom
No, Christopher, that is not a bug. As long as the var is empty, and if you try to compare with 0, or false, it will report true in the comparison because the variable does not contain anything, which will mean false for a boolean and 0 for a variable. If you are attempting to discover if a string

Re: [PHP] Oracle Question

2005-08-11 Thread tg-php
Yeah, you can connect to Oracle remotely. The standard PHP functions should do it probably, but I've done it using ADODB. I don't know if this is the same on a *nix box, but I was running PHP on a Windows box and needed special Oracle stuff installed on my machine to connect to the Oracle DB.

RE: [PHP] PHP and Active Directory

2005-08-11 Thread Nathan Tobik
Here is a php class for Active Directory: http://adldap.sourceforge.net/ Nate Tobik (412)661-5700 x206 VigilantMinds -Original Message- From: xfedex [mailto:[EMAIL PROTECTED] Sent: Thursday, August 11, 2005 2:41 PM To: php-general@lists.php.net Subject: [PHP] PHP and Active Directory

RE: [PHP] PHP and Active Directory

2005-08-11 Thread Jay Blanchard
[snip] Have someone make PHP to authenticate against AD? Any comment, suggestion will be greatly appreciated. [/snip] Are you, at all, familiar with TFM? http://www.php.net/ldap -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] PHP and Active Directory

2005-08-11 Thread xfedex
Hi, Have someone make PHP to authenticate against AD? Any comment, suggestion will be greatly appreciated. Thanks, pancarne. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] PHP & smarty - nested queries and arrays

2005-08-11 Thread Amanda Hemmerich
Hello! I'm using PHP and Smarty to try to build an array of arrays using the results from nested queries. I am just learning about nested arrays, and I'm not sure what I'm doing wrong. I am hoping someone can give me a hint as to what I am doing wrong. I looked on php.net, but still couldn

Re: [PHP] possible bug (string equality to zero)?

2005-08-11 Thread xfedex
Hi, > Is it a bug that ($var == 0) is always true for any string $var? > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > Check this out! http://us3.php.net/manual/en/types.comparisons.php -- PHP General Mailing List (http://www.p

[PHP] Oracle Question

2005-08-11 Thread xfedex
Hi, Can PHP connect to a remote Oracle db? Because all oracle connecting functions only require 'user' and 'pass' http://us3.php.net/manual/en/function.oci-connect.php http://us3.php.net/manual/en/function.ora-plogon.php Thanks, Regards, pancarne. -- PHP General Mailing List (http://www.php.net

[PHP] Best practices for deleting and restoring records - moving vs flagging

2005-08-11 Thread Saqib Ali
Hello All, What are best practices for deleting records in a DB. We need the ability to restore the records. Two obvious choices are: 1) Flag them deleted or undeleted 2) Move the deleted records to seperate table for deleted records. We have a complex schema. However the the records that need

RE: [PHP] Re: possible bug (string equality to zero)?

2005-08-11 Thread Jay Blanchard
[snip] But the var isn't empty. $a[] = 'blah'; $a[] = 'blah'; $a['assoc'] = 'array'; foreach ($a as $k => $v) if ($k == 'assoc') # do something The 'if' statement is incorrectly executing when $k is 0. I find it strange that 0 == any string. The way I see it, 0 is false. false == 'a stri

[PHP] Re: possible bug (string equality to zero)?

2005-08-11 Thread Christopher J. Bottaro
Scott Noyes wrote: >> [snip] >> Is it a bug that ($var == 0) is always true for any string $var? >> [/snip] >> >> You are comparing a string to an integer. > > Right. This is clearly documented at > http://www.php.net/operators.comparison > Oh, I see...it converts the string into number, not

[PHP] Re: possible bug (string equality to zero)?

2005-08-11 Thread Christopher J. Bottaro
Torgny Bjers wrote: > No, Christopher, that is not a bug. As long as the var is empty, and if > you try to compare with 0, or false, it will report true in the > comparison because the variable does not contain anything, which will > mean false for a boolean and 0 for a variable. If you are attemp

Re: [PHP] possible bug (string equality to zero)?

2005-08-11 Thread Chris Shiflett
Christopher J. Bottaro wrote: Is it a bug that ($var == 0) is always true for any string $var? For any string? How about the string 5? :-) PHP tries to help you out, but there's not much it can do when you ask it to compare a string like 'foo' to an integer. It scans your string from left to

[PHP] Re: date field

2005-08-11 Thread John Taylor-Johnston
Thanks Ben! John Ben Ramsey wrote: In PHP, you could do something like: $updated = strtotime($db_result['updated']); $one_year_ago = strtotime('-1 year'); if ($updated < $one_year_ago) { // updated date is older than a year ago } John Taylor-Johnston wrote: I have a field 'updated

Re: [PHP] Regular expression question

2005-08-11 Thread Leon Vismer
Hi Robin Many thanks for this, how would one extend this to support the following: $str = "insert into userComment (userID, userName, userSurname) values (0, 'Leon', 'mcDonald')"; one does not want $str = "insert into user_comment (user_id, user_name, user_surname) values (0, 'Leon', 'mc_dona

Re: [PHP] possible bug (string equality to zero)?

2005-08-11 Thread Scott Noyes
> [snip] > Is it a bug that ($var == 0) is always true for any string $var? > [/snip] > > You are comparing a string to an integer. Right. This is clearly documented at http://www.php.net/operators.comparison -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.ph

Re: [PHP] possible bug (string equality to zero)?

2005-08-11 Thread Torgny Bjers
No, Christopher, that is not a bug. As long as the var is empty, and if you try to compare with 0, or false, it will report true in the comparison because the variable does not contain anything, which will mean false for a boolean and 0 for a variable. If you are attempting to discover if a string

RE: [PHP] possible bug (string equality to zero)?

2005-08-11 Thread Jay Blanchard
[snip] Is it a bug that ($var == 0) is always true for any string $var? [/snip] You are comparing a string to an integer. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] possible bug (string equality to zero)?

2005-08-11 Thread Christopher J. Bottaro
Is it a bug that ($var == 0) is always true for any string $var? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] IP & Geographical

2005-08-11 Thread Jarratt Ingram
Hello John http://www.ip-to-country.com/ provides a downloadable csv database that should help you along your way. HTH On 8/11/05, John Taylor-Johnston <[EMAIL PROTECTED]> wrote: > I have a field in my counter that collects IP addresses. Now the powers > that be want be to collect that data and

Re: [PHP] IP & Geographical

2005-08-11 Thread Greg Donald
On 8/11/05, Greg Donald <[EMAIL PROTECTED]> wrote: > http://sourceforge.net/projects/geoip/ Actually, here's a better URL: http://freshmeat.net/projects/geoip/ -- Greg Donald Zend Certified Engineer MySQL Core Certification http://destiney.com/ -- PHP General Mailing List (http://www.php.net/

Re: [PHP] IP & Geographical

2005-08-11 Thread Duncan Hill
On Thursday 11 August 2005 16:37, John Taylor-Johnston typed: > I have a field in my counter that collects IP addresses. Now the powers > that be want be to collect that data and sort it geographically etc. > Is there anyone who has done this? Where would I find some OS code? I've > heard of it don

Re: [PHP] IP & Geographical

2005-08-11 Thread Greg Donald
On 8/11/05, John Taylor-Johnston <[EMAIL PROTECTED]> wrote: > I have a field in my counter that collects IP addresses. Now the powers > that be want be to collect that data and sort it geographically etc. > Is there anyone who has done this? Where would I find some OS code? I've > heard of it done.

[PHP] IP & Geographical

2005-08-11 Thread John Taylor-Johnston
I have a field in my counter that collects IP addresses. Now the powers that be want be to collect that data and sort it geographically etc. Is there anyone who has done this? Where would I find some OS code? I've heard of it done. John -- PHP General Mailing List (http://www.php.net/) To unsub

Re: [PHP] XML manipulation using PHP

2005-08-11 Thread Jochem Maas
Jay Blanchard wrote: [snip] Could someone please share with me sample code for: - Adding an XML node to an existing XML document. - Modifying the value for a given XML node in an existing XML document. [/snip] Have you looked at the documentation? hey Jay take it easy on the long words. ;-)

RE: [PHP] XML manipulation using PHP

2005-08-11 Thread Jay Blanchard
[snip] Could someone please share with me sample code for: - Adding an XML node to an existing XML document. - Modifying the value for a given XML node in an existing XML document. [/snip] Have you looked at the documentation? http://www.php.net/xml -- PHP General Mailing List (http://www.php.n

[PHP] XML manipulation using PHP

2005-08-11 Thread Anas Mughal
Could someone please share with me sample code for: - Adding an XML node to an existing XML document. - Modifying the value for a given XML node in an existing XML document. Thank you. -- Anas Mughal

Re: [PHP] what should I look for with this error

2005-08-11 Thread John Nichel
Jay Blanchard wrote: [snip] I might pull time zone rules and say that your 4:30 is my 5:30, and that I'm already home. ;) [/snip] Another space-time continuum snafu brought to you by the Consortium For Creative PHP Development Remember the Prime Directive, Number One. -- John C. Nichel Üb

RE: [PHP] REGEX for query

2005-08-11 Thread Michael Sims
Jay Blanchard wrote: > [snip] > Assuming unix, I'd do the following from the root of the application > to get a list > of files that contain queries: > > $ egrep "=[:space:]*\".*\b(SELECT|INSERT|UPDATE)\b" * -ril > ... > > Anyway, that's how I'd do it. Hope you got something out of this... > :) [/

Re: [PHP] Regular expression question

2005-08-11 Thread Robin Vickery
On 8/11/05, Leon Vismer <[EMAIL PROTECTED]> wrote: > Hi > > I would like to convert from one naming convention within a sql statement to > another. > > I have the following, > > > $str = "insert into userComment (userID, userName, userSurname) values (0, > 'Leon', 'Vismer')"; > > $match = arra

RE: [PHP] what should I look for with this error

2005-08-11 Thread Jay Blanchard
[snip] I might pull time zone rules and say that your 4:30 is my 5:30, and that I'm already home. ;) [/snip] Another space-time continuum snafu brought to you by the Consortium For Creative PHP Development -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.ne

RE: [PHP] REGEX for query

2005-08-11 Thread Jay Blanchard
[snip] > > That is a good start, now all I need to do is get the whole query(s) Get them from the mysql logs? [/snip] While that sounds like a good idea there are two things that hamper the effectiveness of this is a total solution; 1. The logs have many queries from other applications that *do

[PHP] Re: Regular expression question

2005-08-11 Thread TalkativeDoggy
How about using the lower() function? Leon Vismer wrote: Hi I would like to convert from one naming convention within a sql statement to another. I have the following, $str = "insert into userComment (userID, userName, userSurname) values (0, 'Leon', 'Vismer')"; $match = array( "/([a-z]

Re: [PHP] what should I look for with this error

2005-08-11 Thread John Nichel
Jochem Maas wrote: John Nichel wrote: Bruce Gilbert wrote: Your heredoc is messed up. Look into getting an editor which will highlight the errors for you. This mailing list isn't here to syntax check (unless it's 4:30 on a Friday). can we hold you to that John ;-) I might pull time z

RE: [PHP] rename an uploaded file.

2005-08-11 Thread Ford, Mike
On 10 August 2005 22:19, Richard Lynch wrote: > You can also, in some versions, "get away" with having \ > inside of "" so > long as the following character isn't special: > $string = "C:\homedirectory\uploadedfiles\\newfile.gif"; > > Note that the 'n' character is special (newline) but 'h' and '

Re: [PHP] REGEX for query

2005-08-11 Thread Robin Vickery
On 8/11/05, Jay Blanchard <[EMAIL PROTECTED]> wrote: > > That is a good start, now all I need to do is get the whole query(s) Get them from the mysql logs? -robin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Regular expression question

2005-08-11 Thread Leon Vismer
Hi > Just a quick note; why dont' you search on "user" since it's the constant > and replace 'user[A-Z]' with 'user_[a-z]' or in the case of userID > 'user[A-Z]{2}' This is part of my problem user will not always be constant, I basically want to be able to change between two naming conventions.

Re: [PHP] what should I look for with this error

2005-08-11 Thread Bruce Gilbert
yea, I was able to get the form to display, thanks. On 8/11/05, Jay Blanchard <[EMAIL PROTECTED]> wrote: > [snip] > Your HEREDOC appears to be messed up. On line 623 the closing identifier > is not in first column of the line (when I cut n paste the code into an > editor. That is a requirement fo

RE: [PHP] REGEX for query

2005-08-11 Thread Jay Blanchard
[snip] Assuming unix, I'd do the following from the root of the application to get a list of files that contain queries: $ egrep "=[:space:]*\".*\b(SELECT|INSERT|UPDATE)\b" * -ril ... Anyway, that's how I'd do it. Hope you got something out of this... :) [/snip] That is a good start, now all I

[PHP] PHP script for removing/forwarding suspected spam from pop3 mailbox

2005-08-11 Thread I. Gray
Hi. I'd like to find or write a script that I can run every so often (hourly for example) from cron that will check my pop3 mailboxes for any emails with SPAM in the subject line and either delete them or forward them to another email address. The best way would be to bundle all the

Re: [PHP] Regular expression question

2005-08-11 Thread b-bonini
n Thu, 11 Aug 2005, Leon Vismer wrote: > Hi > > I would like to convert from one naming convention within a sql statement to > another. > > I have the following, > > > $str = "insert into userComment (userID, userName, userSurname) values (0, > 'Leon', 'Vismer')"; > > $match = array( > "/([a-z]+)

Re: [PHP] optional rule quick_form

2005-08-11 Thread Torgny Bjers
Uroš Gruber wrote: > Torgny Bjers said the following on 11.8.2005 14:44: > >> I am assuming that this is after a post operation. If it's JavaScript, I >> think the question should be directed to another list. So, if you group >> the elements that should be validated after the checkbox has been >>

Re: [PHP] optional rule quick_form

2005-08-11 Thread Uroš Gruber
Torgny Bjers said the following on 11.8.2005 14:44: I am assuming that this is after a post operation. If it's JavaScript, I think the question should be directed to another list. So, if you group the elements that should be validated after the checkbox has been checked, you can activate/deactiva

Re: [PHP] Redisplaying information from a HTML form

2005-08-11 Thread Torgny Bjers
Ravi Gogna wrote: [snip] > I've managed to write the checking program in such a way that clicking > submit launches an 'error' page which displays at the top of the page > which field is wrong, and then redisplays the form. (The form > redisplay is done using a function which uses the variables I

RE: [PHP] what should I look for with this error

2005-08-11 Thread Jay Blanchard
[snip] Your HEREDOC appears to be messed up. On line 623 the closing identifier is not in first column of the line (when I cut n paste the code into an editor. That is a requirement for the heredoc. You also didn't close the PHP block after END_FORM; Then you need to open a PHP block at about line

Re: [PHP] How efficient is OOP in PHP5?

2005-08-11 Thread TalkativeDoggy
I can't agree any more! Maintainability is the most important, and if there is no readability or extensibility, there is no maintainability. So I recongnize what I should do now. Jochem Maas wrote: TalkativeDoggy wrote: Thanks for your help! That is just what I wana hear. Actually, in mo

RE: [PHP] Redisplaying information from a HTML form

2005-08-11 Thread Jim Moseby
> Is there a way I can make these boxes and buttons > retain their value? Without a code example, I am forced to give a generic answer. Here's one way to do it: value="1">Option 1 value="2">Option 2 value="3">Option 3 value="4">Option 4 value="5">Option 5 value=

Re: [PHP] optional rule quick_form

2005-08-11 Thread Torgny Bjers
I am assuming that this is after a post operation. If it's JavaScript, I think the question should be directed to another list. So, if you group the elements that should be validated after the checkbox has been checked, you can activate/deactivate the group validation rules based on the state of th

[PHP] optional rule quick_form

2005-08-11 Thread Uroš Gruber
Hi! I have one checkbox. I checkbox is checked I show additional fields (just set visiblity to true). But some of that fields are required only if this checkbox is checked. Is this possible with quick_form. I try myself with grouping but without any luck. regards Uros -- PHP General Maili

Re: [PHP] How efficient is OOP in PHP5?

2005-08-11 Thread Jochem Maas
TalkativeDoggy wrote: Thanks for your help! That is just what I wana hear. Actually, in most web applications, the real bottle-neck of performance is the Database, but not the PHP scripts-of coz, I don't take obvious mistakes. So I don't wana write my application without OOP or functions, j

Re: [PHP] How efficient is OOP in PHP5?

2005-08-11 Thread TalkativeDoggy
Thanks for your help! That is just what I wana hear. Actually, in most web applications, the real bottle-neck of performance is the Database, but not the PHP scripts-of coz, I don't take obvious mistakes. So I don't wana write my application without OOP or functions, just for this bit perfo

Re: [PHP] Re: dynamic object instances

2005-08-11 Thread Jochem Maas
Eli wrote: Jochem Maas wrote: Eli wrote: I believe that this is the kind of clever, evil stuff the OP was trying to avoid... (evil - eval :-) - besides eval is very slow - not something you (well me then) want to use in a function dedicated to object creation which is comparatively sl

[PHP] Regular expression question

2005-08-11 Thread Leon Vismer
Hi I would like to convert from one naming convention within a sql statement to another. I have the following, $str = "insert into userComment (userID, userName, userSurname) values (0, 'Leon', 'Vismer')"; $match = array( "/([a-z]+)(ID)/", "/([a-z]+)([A-Z])/" ); $replace = array( "\$1_id",

Re: [PHP] Re: dynamic object instances

2005-08-11 Thread Jochem Maas
Thomas Angst wrote: Eli schrieb: You're right that using eval() slows.. But using the _init() function as you suggested is actually tricking in a way you move the constructor params to another function, but the initialization params should be sent to the constructor! I guess that it would b

Re: [PHP] How efficient is OOP in PHP5?

2005-08-11 Thread Jochem Maas
TalkativeDoggy wrote: Hi all, I have heard that "function style is 400% faster than OOP in PHP", and give a little agreement. So in the past year, I write more PHP code in function way while less in OOP way. This morning, I read an article called "How efficient is OOP in PHP" according to th

[PHP] Re: dynamic object instances

2005-08-11 Thread Thomas Angst
Eli schrieb: You're right that using eval() slows.. But using the _init() function as you suggested is actually tricking in a way you move the constructor params to another function, but the initialization params should be sent to the constructor! I guess that it would be better if PHP will

  1   2   >