Re: [PHP] iterate javascript verification

2013-05-24 Thread Ken Robinson
I took your code and modified it to use HTML5 validation (and few other changes). You can see the results at http://my-testbed.com/test1/form_validation.php My code follows: $fields = array('first_name','last_name','department','title','e

Re: [PHP] iterate javascript verification

2013-05-24 Thread musicdev
You can validate via JS if required, for example: (JS CODE): if(element.value.length == 0){ // handle 0 length value } I do agree with Ken that you SHOULD NOT perform JS validation. It is preferable to use php or the new HTML5 features. JS can be turned-off by the user which will make JS val

Re: [PHP] iterate javascript verification

2013-05-24 Thread Ken Robinson
You do realize that you shouldn't rely on Javascript to validate values returned in a form? Also, if you use HTML5, you can use the required attribute in the tag and the browser won't let a user submit a form with a required field not filled. Of course, you should still validate within your P

[PHP] iterate javascript verification

2013-05-24 Thread Tim Dunphy
Hello list, I have a php script that creates a variable number of forms based on a $_POST variable from a preceding page. It then takes the data input into the form and neatly packages the result into an email sent to an email address (eventually to be a ticketing system). Almost everything on

Re: [PHP] Simple objective which always seems to make me think I'm doing it wrong.

2013-05-24 Thread Richard Quadling
On 23 May 2013 16:31, Stuart Dallas wrote: > On 23 May 2013, at 15:54, Richard Quadling wrote: > > > I'm building an XML file. > > > > It is within an OOP structure and is pretty simple. > > > > The method is ... > > > >/** > > * Turn an error from the W2GlobalData service into normal do

Re: [PHP] Random

2013-05-24 Thread Jim Giner
On 5/24/2013 3:04 AM, Last Hacker Always onpoint wrote: I needed something like this echo(rand(1,30)) On 5/24/13, Last Hacker Always onpoint wrote: okay thanks tamouse and others you think am not on point hmmm? I'll show you i am. On 5/24/13, tamouse mailing lists wrote: On Thu, May 23, 201

Re: [PHP] Random

2013-05-24 Thread Nick Pratley
Lola On Friday, May 24, 2013, Ashley Sheridan wrote: > > > Last Hacker Always onpoint > wrote: > > >I needed something like this echo(rand(1,30)) > > > >On 5/24/13, Last Hacker Always onpoint > > wrote: > >> okay thanks tamouse and others you think am not on point hmmm? I'll > >> show you i am. >

[PHP] RE: json_decode mistery - solved

2013-05-24 Thread Radek Krejča
var_dump(json_decode(Trim($decrypted_data), true)); I dont know why, but there is any spaces, this is working. Radek -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Random

2013-05-24 Thread Ashley Sheridan
Last Hacker Always onpoint wrote: >I needed something like this echo(rand(1,30)) > >On 5/24/13, Last Hacker Always onpoint wrote: >> okay thanks tamouse and others you think am not on point hmmm? I'll >> show you i am. >> >> On 5/24/13, tamouse mailing lists wrote: >>> On Thu, May 23, 2013 at

[PHP] json_decode mistery

2013-05-24 Thread Radek Krejča
Hello, I am usin json regulary, but in one script I have mistery: echo($decrypted_data)."\n\n"; var_dump(json_decode($decrypted_data, true)); echo "\n"; var_dump(json_decode('{"result_ok":true,"result_message":null,"client_name":"Radek Krej\u010da"}', true)); I got: {"result_ok":true,"result_me

Re: [PHP] Random

2013-05-24 Thread Last Hacker Always onpoint
I needed something like this echo(rand(1,30)) On 5/24/13, Last Hacker Always onpoint wrote: > okay thanks tamouse and others you think am not on point hmmm? I'll > show you i am. > > On 5/24/13, tamouse mailing lists wrote: >> On Thu, May 23, 2013 at 3:51 PM, Last Hacker Always onpoint >> wrote