Re: [PHP] Fun with Streams

2010-02-22 Thread Rene Veerman
>http://www.bettina-attack.de/jonny/view.php/projects/php_writeexcel/ >And, hey, when the hell will the PHP developers implement a foreach loop which >assigns the array values by reference?? +100! (still reading the rest) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, vis

Re: [PHP] Fun with Streams

2010-02-22 Thread Rene Veerman
just curious, why did you choose to use it from behind a stream wrapper? and sry, i have no exp with these beasts.. On Sun, Feb 21, 2010 at 11:03 PM, Matt Neimeyer wrote: > I created a stream wrapper around the php_writeexcel library found at > http://www.bettina-attack.de/jonny/view.php/projec

RE: [PHP] Fun with Streams

2010-02-22 Thread Ford, Mike
> -Original Message- > From: Rene Veerman [mailto:rene7...@gmail.com] > Sent: 22 February 2010 09:09 > > >http://www.bettina- > attack.de/jonny/view.php/projects/php_writeexcel/ > >And, hey, when the hell will the PHP developers implement a foreach > loop which assigns the array values b

[PHP] help, please, understanding my problem

2010-02-22 Thread Stan
I have a PHP page that has require_once("genMyOverlay.js.php"); . . . echo ""; echo "doit(\"mydiv\");"; echo ""; genMyOverlay.js.php contains: createDiv() (see below) that creates a and sets it up to overlay a portion of the wbe page and doit()starts it off. invoke the web page once and i

Re: [PHP] help, please, understanding my problem

2010-02-22 Thread Ashley Sheridan
On Mon, 2010-02-22 at 09:09 -0600, Stan wrote: > I have a PHP page that has > require_once("genMyOverlay.js.php"); > . > . > . > echo ""; > echo "doit(\"mydiv\");"; > echo ""; > > genMyOverlay.js.php contains: createDiv() (see below) that creates a ID="mydiv"> and sets it up to overlay a

Re: [PHP] help, please, understanding my problem

2010-02-22 Thread tedd
At 3:15 PM + 2/22/10, Ashley Sheridan wrote: Also, your script tags need a type attribute:

Re: [PHP] help, please, understanding my problem

2010-02-22 Thread Ashley Sheridan
On Mon, 2010-02-22 at 12:33 -0500, tedd wrote: > At 3:15 PM + 2/22/10, Ashley Sheridan wrote: > >Also, your script tags need a type attribute: > > > >

Re: [PHP] help, please, understanding my problem

2010-02-22 Thread tedd
At 5:32 PM + 2/22/10, Ashley Sheridan wrote: On Mon, 2010-02-22 at 12:33 -0500, tedd wrote: At 3:15 PM + 2/22/10, Ashley Sheridan wrote: Also, your script tags need a type attribute: >

[PHP] $_POST vs $_REQUEST

2010-02-22 Thread Slack-Moehrle
Hi All, I have Forms that I submit for processing. I have seen examples of people using either $_POST or $_REQUEST. When would I choose one over the other? Also, I see examples of these being used with and without the single quotes Like: $_POST[j_orderValue] or $_POST['j_orderValue'] Single

Re: [PHP] $_POST vs $_REQUEST

2010-02-22 Thread Richard
Hi, > I have Forms that I submit for processing. I have seen examples of people > using either $_POST or $_REQUEST. > > When would I choose one over the other? It's a wise choice to go with $_POST, unless your form is a GET form, in which case use $_GET. $_REQUEST has the potential to open your

Re: [PHP] $_POST vs $_REQUEST

2010-02-22 Thread shiplu
On Tue, Feb 23, 2010 at 2:39 AM, Slack-Moehrle wrote: > Hi All, > > I have Forms that I submit for processing. I have seen examples of people > using either $_POST or $_REQUEST. > > When would I choose one over the other? > > Also, I see examples of these being used with and without the single qu

Re: [PHP] $_POST vs $_REQUEST

2010-02-22 Thread Joseph Thayne
Richard wrote: It's a wise choice to go with $_POST, unless your form is a GET form, in which case use $_GET. $_REQUEST has the potential to open your script(s) up to security issues. I am not sure what the security issues are you are referring to as the $_REQUEST superglobal contains both

Re: [PHP] $_POST vs $_REQUEST

2010-02-22 Thread Rene Veerman
On Mon, Feb 22, 2010 at 9:39 PM, Slack-Moehrle wrote: > Hi All, > > I have Forms that I submit for processing. I have seen examples of people > using either $_POST or $_REQUEST. > > When would I choose one over the other? I like to be specific and go for $_POST, but some people want flexibility

Re: [PHP] $_POST vs $_REQUEST

2010-02-22 Thread John Black
On 02/22/2010 09:39 PM, Slack-Moehrle wrote: Hi All, I have Forms that I submit for processing. I have seen examples of people using either $_POST or $_REQUEST. When would I choose one over the other? When you don't care how you get the data use $_REQUEST. $_REQUEST will contain $_GET,$_POST,$

Re: [PHP] $_POST vs $_REQUEST

2010-02-22 Thread Rene Veerman
> i'd expect without quotes to query a define('j_orderValue','??').. oh, and that, if not defined, defaults to the string 'j_orderValue'. So while your $_POST[] with or without quotes will "do the same", use single-quotes anyway because it's "the right thing to do" ;) -- PHP General Mailing List

Re: [PHP] $_POST vs $_REQUEST

2010-02-22 Thread Richard
Hi, > I am not sure what the security issues are you are referring to as the > $_REQUEST superglobal contains both $_GET and $_POST values.  Could you > expound on that?  Thanks. Not really, do a search. -- Richard Heyes HTML5 canvas graphing: RGraph - http://www.rgraph.net (updated 20th Februa

Re: [PHP] $_POST vs $_REQUEST

2010-02-22 Thread Kim Madsen
Hi Slack-Moehrle Slack-Moehrle wrote on 22/02/2010 21:39: Hi All, I have Forms that I submit for processing. I have seen examples of people using either $_POST or $_REQUEST. When would I choose one over the other? $_REQUEST['test'] is true on both $_GET['test'] and $_POST['test'] I use it

Re: [PHP] $_POST vs $_REQUEST

2010-02-22 Thread Dotan Cohen
> I have Forms that I submit for processing. I have seen examples of people > using either $_POST or $_REQUEST. > Look at this example: Now what do you thing $_REQUEST will return? You had better not even think. Just use $_POST or $_GET as you _know_ what they will return. Don't forget, the

Re: [PHP] $_POST vs $_REQUEST

2010-02-22 Thread Michael Shadle
On Mon, Feb 22, 2010 at 12:55 PM, Joseph Thayne wrote: > I am not sure what the security issues are you are referring to as the > $_REQUEST superglobal contains both $_GET and $_POST values.  Could you > expound on that?  Thanks. $_REQUEST opens you up to POST/GET values overriding cookie values

RE: [PHP] $_POST vs $_REQUEST

2010-02-22 Thread David Murphy
Richard, The use of $_REQUEST it no more a security hole than $_GET or $_REQUEST, they should ALL be treats as bad data until normalized and sanitized. The claim that it opens a security hole is just false, that’s like saying PHP is insecure, its not it just allows for lazy coding such as $_RE

Re: [PHP] $_POST vs $_REQUEST

2010-02-22 Thread Michael Shadle
On Mon, Feb 22, 2010 at 1:30 PM, David Murphy wrote: > Richard, > > > The use of $_REQUEST it no more a security hole than $_GET or $_REQUEST, > they should ALL be treats as bad data until normalized and sanitized.  The > claim that it opens a security hole  is  just false, that’s like saying PHP

Re: [PHP] $_POST vs $_REQUEST

2010-02-22 Thread Slack-Moehrle
John, >>Then if you use a MySQL database you would escape the string like this >>$tmp = mysql_real_escape_string($_REQUEST['yyy']); >>mysql_real_escape_string() protect from SQL injection by escaping your >>string according to what your charset requires. Good point, I should be doing that. But

Re: [PHP] $_POST vs $_REQUEST

2010-02-22 Thread John Black
On 02/22/2010 10:37 PM, Michael Shadle wrote: On Mon, Feb 22, 2010 at 1:30 PM, David Murphy wrote: Richard, The use of $_REQUEST it no more a security hole than $_GET or $_REQUEST, they should ALL be treats as bad data until normalized and sanitized. The claim that it opens a security hole is

Re: [PHP] $_POST vs $_REQUEST

2010-02-22 Thread Michael Shadle
On Mon, Feb 22, 2010 at 2:07 PM, John Black wrote: > And how is this more secure? I can create a cookie, send post or get on my > client machine and send anything I want to the server. Just because you are > getting a cookie does not mean that you created it :) > > So you might as well use reques

Re: [PHP] $_POST vs $_REQUEST

2010-02-22 Thread Andrew Ballard
On Mon, Feb 22, 2010 at 5:02 PM, Slack-Moehrle wrote: > John, > >>>Then if you use a MySQL database you would escape the string like this >>>$tmp = mysql_real_escape_string($_REQUEST['yyy']); > > >>>mysql_real_escape_string() protect from SQL injection by escaping your >>>string according to what

Re: [PHP] $_POST vs $_REQUEST

2010-02-22 Thread John Black
On 02/22/2010 11:17 PM, Michael Shadle wrote: "Secure" might be the wrong term here. As you can easily change GET to POST and vice-versa and send any cookies you like, this is why I tried to revise my statement and quantify it better... in a properly coded app it doesn't present much issue. Howev

Re: [PHP] $_POST vs $_REQUEST

2010-02-22 Thread Daniel Egeberg
On Mon, Feb 22, 2010 at 22:37, Michael Shadle wrote: > On Mon, Feb 22, 2010 at 1:30 PM, David Murphy wrote: >> Richard, >> >> >> The use of $_REQUEST it no more a security hole than $_GET or $_REQUEST, >> they should ALL be treats as bad data until normalized and sanitized.  The >> claim that it

[PHP] PHP / mySQL Project...

2010-02-22 Thread Don Wieland
Hello, I am needing assistance IMMEDIATELY in finishing up a project (the developer went in to have shoulder surgery and will be out of commission for 3 weeks) and I need this finished soon. Candidate must have good english skills, a solid knowledge of HTML, CSS, PHP, mySQL, Javascript, A

Re: [PHP] $_POST vs $_REQUEST

2010-02-22 Thread Michael Shadle
The difference here is you can at least have some control over the data and expect it in a certain fashion. Also the behavior of cookies vs. get vs. post are different (cookies have length and expiration limits, get has length limits, post has server confgured limits) Like I said a properly

Re: [PHP] $_POST vs $_REQUEST

2010-02-22 Thread Jochem Maas
Op 2/22/10 8:39 PM, Slack-Moehrle schreef: > Hi All, > > I have Forms that I submit for processing. I have seen examples of people > using either $_POST or $_REQUEST. > > When would I choose one over the other? use $_POST, $_REQUEST is normally an amalgam of GET, POST and COOKIE - as such usin

Re: [PHP] $_POST vs $_REQUEST

2010-02-22 Thread John Black
On 02/22/2010 11:42 PM, Michael Shadle wrote: The difference here is you can at least have some control over the data and expect it in a certain fashion. Also the behavior of cookies vs. get vs. post are different (cookies have length and expiration limits, get has length limits, post has server

[PHP] Re: PHP / mySQL Project...

2010-02-22 Thread Carlos Medina
Hi Don, i work for the company simplynetworks in germany. I have access to may programmers with the best quality to the best prices. We work quick and no dirty ;-) I am programmer too and my company offer you the best object oriented software of the market. Some references of my clients in Germ

Re: [PHP] $_POST vs $_REQUEST

2010-02-22 Thread Ashley Sheridan
On Mon, 2010-02-22 at 23:49 +0100, John Black wrote: > On 02/22/2010 11:42 PM, Michael Shadle wrote: > > The difference here is you can at least have some control over the data > > and expect it in a certain fashion. Also the behavior of cookies vs. get > > vs. post are different (cookies have len

Re: [PHP] PHP / mySQL Project...

2010-02-22 Thread Ashley Sheridan
On Mon, 2010-02-22 at 14:39 -0800, Don Wieland wrote: > Hello, > > I am needing assistance IMMEDIATELY in finishing up a project (the > developer went in to have shoulder surgery and will be out of > commission for 3 weeks) and I need this finished soon. > > Candidate must have good english

[PHP] Sending e-mail via socket

2010-02-22 Thread Andre Polykanine
Hello everyone, I've just subscribed to the list, and I already have a question. what I need to do is to send mail using sockets. Actually, the built-in Mail() function is great and I wouldn't have to search for something else if I didn't need more than one message to be sent at a time. Say, I have

RE: [PHP] PHP / mySQL Project... Real men use 'cat'

2010-02-22 Thread Daevid Vincent
> -Original Message- > From: Ashley Sheridan [mailto:a...@ashleysheridan.co.uk] > > On Mon, 2010-02-22 at 14:39 -0800, Don Wieland wrote: > > > I am needing assistance IMMEDIATELY in finishing up a project (the > > developer went in to have shoulder surgery and will be out of > > com

Re: [PHP] Sending e-mail via socket

2010-02-22 Thread Rene Veerman
have you tried mail() with a large bcc header? On Tue, Feb 23, 2010 at 1:16 AM, Andre Polykanine wrote: > Hello everyone, > I've just subscribed to the list, and I already have a question. > what I need to do is to send mail using sockets. Actually, the > built-in Mail() function is great and I w

Re: [PHP] Sending e-mail via socket

2010-02-22 Thread Paul M Foster
On Tue, Feb 23, 2010 at 02:16:24AM +0200, Andre Polykanine wrote: > Hello everyone, > I've just subscribed to the list, and I already have a question. > what I need to do is to send mail using sockets. Actually, the > built-in Mail() function is great and I wouldn't have to search for > something

[PHP] PDOStatement::rowCount() bug?

2010-02-22 Thread Paul M Foster
Using MySQL 5.075, PHP 5.25 on Debian unstable. Has anyone noticed, when issuing a PDOStatement::rowCount() call after a DELETE, UPDATE or INSERT, the return is uniformly zero, rather than the actual number of rows affected? If so, is there a simple workaround? Paul -- Paul M. Foster -- PHP

Re: [PHP] PDOStatement::rowCount() bug?

2010-02-22 Thread Nathan Nobbe
On Mon, Feb 22, 2010 at 7:50 PM, Paul M Foster wrote: > Using MySQL 5.075, PHP 5.25 on Debian unstable. > > Has anyone noticed, when issuing a PDOStatement::rowCount() call after a > DELETE, UPDATE or INSERT, the return is uniformly zero, rather than the > actual number of rows affected? > quick

Re: [PHP] PDOStatement::rowCount() bug?

2010-02-22 Thread Paul M Foster
On Mon, Feb 22, 2010 at 08:18:25PM -0700, Nathan Nobbe wrote: > On Mon, Feb 22, 2010 at 7:50 PM, Paul M Foster > wrote: > > Using MySQL 5.075, PHP 5.25 on Debian unstable. > > Has anyone noticed, when issuing a PDOStatement::rowCount() call after a > DELETE, UPDATE or INSERT, the r

Re: [PHP] PDOStatement::rowCount() bug?

2010-02-22 Thread Nathan Nobbe
On Mon, Feb 22, 2010 at 8:39 PM, Paul M Foster wrote: > On Mon, Feb 22, 2010 at 08:18:25PM -0700, Nathan Nobbe wrote: > > > On Mon, Feb 22, 2010 at 7:50 PM, Paul M Foster > wrote: > > > > Using MySQL 5.075, PHP 5.25 on Debian unstable. > > > > Has anyone noticed, when issuing a PDOStateme

Re: [PHP] PDOStatement::rowCount() bug?

2010-02-22 Thread Paul M Foster
On Mon, Feb 22, 2010 at 09:50:30PM -0500, Paul M Foster wrote: > Using MySQL 5.075, PHP 5.25 on Debian unstable. > > Has anyone noticed, when issuing a PDOStatement::rowCount() call after a > DELETE, UPDATE or INSERT, the return is uniformly zero, rather than the > actual number of rows affected?

[PHP] unpacking an array of structs...

2010-02-22 Thread php.l...@juun.com
I have a desktop app that has a data structure that looks like this: typedef struct MANGOpie { unsigned char mango; unsigned short pie; } MANGOpie; I manage a C array of these things in memory: MANGOpie * pies = (MANGOpie *)malloc(count*sizeof(MANGOpie)); I pass these to a PHP s

Re: [PHP] unpacking an array of structs...

2010-02-22 Thread Nathan Nobbe
On Monday, February 22, 2010, php.l...@juun.com wrote: > > I have a desktop app that has a data structure that looks like this: > > typedef struct MANGOpie > { >   unsigned char   mango; >   unsigned short  pie; > } > MANGOpie; > > > > I manage a C array of these things in memory: > > MANGOpie *

Re: [PHP] unpacking an array of structs...

2010-02-22 Thread Rene Veerman
have you considered using json as transport? http://json.org/ has code you can re-use. On Tue, Feb 23, 2010 at 7:29 AM, php.l...@juun.com wrote: > > I have a desktop app that has a data structure that looks like this: > > typedef struct MANGOpie > { >   unsigned char   mango; >   unsigned short  

Re: [PHP] unpacking an array of structs...

2010-02-22 Thread php.l...@juun.com
I'm actually moving from a string-encoded transport to binary for compactness. The array can potentially get pretty large. I'm shooting for the smallest possible representation of the data, which is 1 char and 1 short per data point. On February 23, 2010, Rene Veerman wrote: have y

Re: [PHP] unpacking an array of structs...

2010-02-22 Thread php.l...@juun.com
In the desktop app's memory the data is packed end-to-end already: typedef struct MANGOpie { unsigned char mango; unsigned short pie; } MANGOpie; MANGOpie * pies = (MANGOpie *)malloc(count*sizeof(MANGOpie)); ...and the entire 'pies' array is sent to the PHP script as binary data usin

Re: [PHP] Sending e-mail via socket

2010-02-22 Thread Per Jessen
Andre Polykanine wrote: > Hello everyone, > I've just subscribed to the list, and I already have a question. > what I need to do is to send mail using sockets. Actually, the > built-in Mail() function is great and I wouldn't have to search for > something else if I didn't need more than one messag