[nyphp-talk] DOM XML questions

2007-11-19 Thread Ajai Khattri
Anyone here familiar with the DOM XML functions in PHP? Im running an XPath query on an XML document and I get back a list of DOM Elements which I can iterate through. Great. But want I really want to do it convert all of those tags into strings, concatenate them together and save them in a da

Re: [nyphp-talk] Why is pass-by-reference deprecated?

2007-11-19 Thread Rob Marscher
On Nov 19, 2007, at 4:29 PM, Ben Sgro (ProjectSkyLine) wrote: Hello, Sorry to hijack, but I started thinking about something I read for optimization of php. They stated, if you know your not going to make changes to a variable, to send it to a function as reference, as to NOT make a copy of it.

Re: [nyphp-talk] Injection Attack, any ideas?

2007-11-19 Thread tedd
At 1:25 PM -0500 11/12/07, Dan Cech wrote: tedd wrote: > Scrub and clean all user input. My understanding -- nothing can get in unless you allow it (barring server breaches). Here's an example of js injection: http://webbytedd.com/bb/insecure-form/ SQL injection (as I understand it) is

Re: [nyphp-talk] Why is pass-by-reference deprecated?

2007-11-19 Thread Ben Sgro (ProjectSkyLine)
Hello Cliff, Alright, makes sense. Thanks. - Original Message - From: "Cliff Hirsch" <[EMAIL PROTECTED]> To: "NYPHP Talk" Sent: Monday, November 19, 2007 4:21 PM Subject: Re: [nyphp-talk] Why is pass-by-reference deprecated? Hello, Sorry to hijack, but I started thinking about so

Re: [nyphp-talk] detecting Java Script from within a PHP script.

2007-11-19 Thread tedd
At 9:00 AM -0500 11/16/07, Urb LeJeune wrote: Sorry about the last message, I accidently hit the send button. It there a way to detect if a user's browser has Java Script enabled from within a PHP script? Urb No. PHP runs before the browser/javascript does. Having php deter

Re: [nyphp-talk] Why is pass-by-reference deprecated?

2007-11-19 Thread Cliff Hirsch
> Hello, > > Sorry to hijack, but I started thinking about something I read > for optimization of php. > > They stated, if you know your not going to make changes > to a variable, to send it to a function as reference, as to NOT > make a copy of it... > Going back to some very, very old threads

Re: [nyphp-talk] Why is pass-by-reference deprecated?

2007-11-19 Thread Ben Sgro (ProjectSkyLine)
Hello, Sorry to hijack, but I started thinking about something I read for optimization of php. They stated, if you know your not going to make changes to a variable, to send it to a function as reference, as to NOT make a copy of it... Is this really worthwhile? func($a) { echo $a; } VS f

Re: [nyphp-talk] Why is pass-by-reference deprecated?

2007-11-19 Thread Cliff Hirsch
On 11/19/07 1:27 PM, "Gary Mort" <[EMAIL PROTECTED]> wrote: > Cliff Hirsch wrote: >> The php manual says: >> ³In recent versions of PHP you will get a warning saying that >> "Call-time pass-by-reference" is deprecated when you use a & in foo(&$a);² >> Why is this? Besides being ugly, difficult to u

Re: [nyphp-talk] Why is pass-by-reference deprecated?

2007-11-19 Thread Allen Shaw
Gary Mort wrote: Cliff Hirsch wrote: Besides being ugly, difficult to understand and not very elegant... Because ... you should know ahead of time whether or not you want to pass by reference or pass a copy, and not decide to do it at the time you call your code. [snip] That's a good explanat

Re: [nyphp-talk] Why is pass-by-reference deprecated?

2007-11-19 Thread Jake McGraw
I believe pass-by-reference is now noted in function definitions ala: function myFunc(&$myvar) {/* Function */} whereas in PHP4, you could force pass-by-reference at runtime using: myFunc(&$myvar); This was depreciated because parameter definitions should be maintained in the function definitio

Re: [nyphp-talk] Why is pass-by-reference deprecated?

2007-11-19 Thread Gary Mort
Cliff Hirsch wrote: The php manual says: “In recent versions of PHP you will get a warning saying that "Call-time pass-by-reference" is deprecated when you use a & in foo(&$a);” Why is this? Besides being ugly, difficult to understand and not very elegant, is there any reason technical reaso

[nyphp-talk] Why is pass-by-reference deprecated?

2007-11-19 Thread Cliff Hirsch
The php manual says: ³In recent versions of PHP you will get a warning saying that "Call-time pass-by-reference" is deprecated when you use a & in foo(&$a);² Why is this? Besides being ugly, difficult to understand and not very elegant, is there any reason technical reason why this is deprecated?

Re: [nyphp-talk] Programming Standards

2007-11-19 Thread Tom Melendez
On Nov 19, 2007 7:05 AM, David Krings <[EMAIL PROTECTED]> wrote: > Urb LeJeune wrote: > > It all depends upon you philosophy of programming. To most > > people a good program is one that works. To me a good program > > has three important characteristics: > > > > 1. It does what the specifi

Re: [nyphp-talk] Programming Standards

2007-11-19 Thread David Krings
Urb LeJeune wrote: It all depends upon you philosophy of programming. To most people a good program is one that works. To me a good program has three important characteristics: 1. It does what the specifications require under all circumstances. 2. It is efficient in the use of resources,

[nyphp-talk] Programming Standards

2007-11-19 Thread Urb LeJeune
If it's one or two lines, a function can be more distracting than it's worth. Until you find an error in those lines, or you need to add an extra line. It all depends upon you philosophy of programming. To most people a good program is one that works. To me a good program has

Re: [nyphp-talk] Passing info entered into HTML FORMS into SESSIONvariables.

2007-11-19 Thread PaulCheung
Hi Micheal, Using a search criteria, a MySQL call is made and the required MySQL record is returned. The HTML FORM is made up of three forms. the first two forms are used to display (read-only) infomation to the enduser The third and last FORM is used by the enduser to update the MySQL record.