[PHP] Re: php cli question

2010-09-11 Thread Shawn McKenzie
On 09/10/2010 11:13 AM, J Ravi Menon wrote: > Hi, > > I have some basic questions on running php (5.2.x series on Linux > 2.6) as a standalone daemon using posix methods (fork() etc..): > > #!/usr/bin/php > > require_once ('someclass.php'); > > // do some initializations > . > > // main 'for

[PHP] Re: How to handle a submitted form with no changes -- best practices sought

2010-09-11 Thread Shawn McKenzie
On 09/11/2010 11:52 AM, Tamara Temple wrote: > I have a general question and am looking for best practices. > > Suppose I present a user with a form for editing an entry in a table, > i.e., the form has filled in values from the existing table entry. > > Now, suppose they click on 'submit' withou

Re: [PHP] New to PHP and the list

2010-09-11 Thread viraj
On Sun, Sep 12, 2010 at 5:07 AM, MikeB wrote: > Hello, I'm new to PHP and also new to using newsgroups/mailing lists > directly. So if I make a mistake, please forgive me this once and I'll try > to do better in the future. > > Please help me understand, my head is absolutely spinning and I can't

Re: [PHP] How to handle a submitted form with no changes -- best practices sought

2010-09-11 Thread viraj
On Sat, Sep 11, 2010 at 10:22 PM, Tamara Temple wrote: > I have a general question and am looking for best practices. > > Is it worth the overhead of passing along the previous values in the table > in hidden fields so that fields can be checked to see if they've been without storing all the valu

Re: [PHP] New to PHP and the list

2010-09-11 Thread MikeB
On 9/11/2010 6:51 PM, Tom Sparks wrote: --- On Sun, 12/9/10, MikeB wrote: From: MikeB Subject: [PHP] New to PHP and the list To: php-general@lists.php.net Received: Sunday, 12 September, 2010, 9:37 AM Hello, I'm new to PHP and also new to using newsgroups/mailing lists directly. So if I make a

Re: [PHP] New to PHP and the list

2010-09-11 Thread Tom Sparks
--- On Sun, 12/9/10, MikeB wrote: > From: MikeB > Subject: [PHP] New to PHP and the list > To: php-general@lists.php.net > Received: Sunday, 12 September, 2010, 9:37 AM > Hello, I'm new to PHP and also new to > using newsgroups/mailing lists directly. So if I make a > mistake, please forgive me

Re: [PHP] Elegance is the goal... Sticky form submit help

2010-09-11 Thread tedd
At 1:09 PM -0400 9/11/10, Jason Pruim wrote: Hey tedd, Thanks for the response but for this particular project I'm avoiding using anything but standard HTML since it will be used almost exclusively by people using screen readers and other assistive technology so I'm going a little old school

Re: [PHP] Elegance is the goal... Sticky form submit help

2010-09-11 Thread tedd
At 11:42 AM -0500 9/11/10, Tamara Temple wrote: The debate on client-side vs. server-side form validation is ongoing. Client-side is more responsive, and attempts to keep bad data from ever reaching your application, but relies on javascript being enabled. Since this is something easily turned

Re: [PHP] Elegance is the goal... Sticky form submit help

2010-09-11 Thread Jim Lucas
Jason Pruim wrote: Hi Tamara, On Sep 11, 2010, at 12:39 PM, Tamara Temple wrote: Rather than repeating all that code, I suggest the following: -- select type -- $_POST['hidSubmit'] == TRUE && $_POST['type'] == "meeting") ? "selected" : '' ?> $_POST['hidSubmit'] == TRUE && $_POST['type

Re: [PHP] Disabling an extension on a perdir basis.

2010-09-11 Thread Jim Lucas
Richard Quadling wrote: On 11 September 2010 17:56, Jim Lucas wrote: Richard Quadling wrote: Hi. Can't seem to see a way to do this. Is there a way to do this? Are you talking about a PHP extension or a file extension? I sat there for about a minute reading Ashley's comment, thinking "w

Re: [PHP] Disabling an extension on a perdir basis.

2010-09-11 Thread Richard Quadling
On 11 September 2010 17:56, Jim Lucas wrote: > Richard Quadling wrote: >> >> Hi. >> >> Can't seem to see a way to do this. >> >> Is there a way to do this? >> > > Are you talking about a PHP extension or a file extension? > I sat there for about a minute reading Ashley's comment, thinking "what t

Re: [PHP] Elegance is the goal... Sticky form submit help

2010-09-11 Thread Jason Pruim
On Sep 11, 2010, at 1:03 PM, Debbie . wrote: Jason, I don't really understand the responses you got to this email, I have attached the sticky form I made from a book called "PHP Visual Quickstart guide. It uses an if conditional to print a response if the field is empty. If I'm not helpi

Re: [PHP] Elegance is the goal... Sticky form submit help

2010-09-11 Thread Jason Pruim
Hi Tamara, On Sep 11, 2010, at 12:39 PM, Tamara Temple wrote: Rather than repeating all that code, I suggest the following: -- select type -- $_POST['hidSubmit'] == TRUE && $_POST['type'] == "meeting") ? "selected" : '' ?> $_POST['hidSubmit'] == TRUE && $_POST['type'] == "event") ?

Re: [PHP] Elegance is the goal... Sticky form submit help

2010-09-11 Thread Jason Pruim
Hey Ash, On Sep 11, 2010, at 10:58 AM, a...@ashleysheridan.co.uk wrote: For a month selector, using a loop to output the months is good, as you can then within the loop check for that value sent and set the selected html attribute for that select element. that's what I was thinking too...

Re: [PHP] Elegance is the goal... Sticky form submit help

2010-09-11 Thread Jason Pruim
On Sep 11, 2010, at 11:55 AM, tedd wrote: At 9:49 AM -0400 9/11/10, Jason Pruim wrote: Hey everyone! Hope you are having a great weekend, and I'm hoping someone might be coherent enough to help me find a more elegant solution to a problem that I have... I have a form for submitting an e

Re: [PHP] Disabling an extension on a perdir basis.

2010-09-11 Thread Jim Lucas
Richard Quadling wrote: Hi. Can't seem to see a way to do this. Is there a way to do this? Are you talking about a PHP extension or a file extension? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] How to handle a submitted form with no changes -- best practices sought

2010-09-11 Thread Tamara Temple
I have a general question and am looking for best practices. Suppose I present a user with a form for editing an entry in a table, i.e., the form has filled in values from the existing table entry. Now, suppose they click on 'submit' without making any changes in the form. (Perhaps, say, ra

Re: [PHP] Elegance is the goal... Sticky form submit help

2010-09-11 Thread Tamara Temple
The debate on client-side vs. server-side form validation is ongoing. Client-side is more responsive, and attempts to keep bad data from ever reaching your application, but relies on javascript being enabled. Since this is something easily turned off by users, one can't always rely on it to

Re: [PHP] Elegance is the goal... Sticky form submit help

2010-09-11 Thread Tamara Temple
Rather than repeating all that code, I suggest the following: -- select type -- $_POST['hidSubmit'] == TRUE && $_POST['type'] == "meeting") ? "selected" : '' ?> $_POST['hidSubmit'] == TRUE && $_POST['type'] == "event") ? "selected" : '' ?> For a month selector, try: $months = a

Re: [PHP] Elegance is the goal... Sticky form submit help

2010-09-11 Thread tedd
At 9:49 AM -0400 9/11/10, Jason Pruim wrote: Hey everyone! Hope you are having a great weekend, and I'm hoping someone might be coherent enough to help me find a more elegant solution to a problem that I have... I have a form for submitting an event to a website, and if the form is not subm

Re: [PHP] Elegance is the goal... Sticky form submit help

2010-09-11 Thread a...@ashleysheridan.co.uk
For a month selector, using a loop to output the months is good, as you can then within the loop check for that value sent and set the selected html attribute for that select element. I should warn you that your code will throw a warning when no data has been posted to it. Consider using isset(

[PHP] Elegance is the goal... Sticky form submit help

2010-09-11 Thread Jason Pruim
Hey everyone! Hope you are having a great weekend, and I'm hoping someone might be coherent enough to help me find a more elegant solution to a problem that I have... I have a form for submitting an event to a website, and if the form is not submitted successfully (such as they didn't fil

Re: [PHP] Disabling an extension on a perdir basis.

2010-09-11 Thread a...@ashleysheridan.co.uk
If you want to prevent certain extensions then just flirt then out from the $_FILES array before you copy them out of the temp directory, as that is where they should be uploaded ready for your script to process. Thanks, Ash http://www.ashleysheridan.co.uk - Reply message - From: "Richa

[PHP] Disabling an extension on a perdir basis.

2010-09-11 Thread Richard Quadling
Hi. Can't seem to see a way to do this. Is there a way to do this? -- Richard Quadling Twitter : EE : Zend @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php