php-general Digest 6 Jun 2012 09:32:38 -0000 Issue 7843

Topics (messages 318168 through 318176):

Re: disabled cookies
        318168 by: Tedd Sperling
        318169 by: Tedd Sperling
        318171 by: Matijn Woudt

Re: Happy Diamond Jubilee everyone!
        318170 by: Tedd Sperling

Read dynamic variable from HTML form into PHP
        318172 by: Devang Patel
        318173 by: Govinda
        318174 by: Govinda
        318175 by: Jim Giner
        318176 by: Maciek Sokolewicz

Administrivia:

To subscribe to the digest, e-mail:
        php-general-digest-subscr...@lists.php.net

To unsubscribe from the digest, e-mail:
        php-general-digest-unsubscr...@lists.php.net

To post to the list, e-mail:
        php-gene...@lists.php.net


----------------------------------------------------------------------
--- Begin Message ---
On Jun 3, 2012, at 5:21 PM, Ashley Sheridan wrote:
> 
> There is a new law been passed in the UK that makes non-essential cookies 
> opt-in only, so you must get permission in order to use them.

What's a non-essential cookie?

Cheers,

tedd

_____________________
tedd.sperl...@gmail.com
http://sperling.com

--- End Message ---
--- Begin Message ---
On Jun 4, 2012, at 6:13 PM, Ashley Sheridan wrote:
> 
> Yeah, it's been such a pain, as nobody over here is quite sure how the
> hell it'll be enforced either, or if it even will be. It's also pretty
> vague as to just where the line gets drawn. The official government
> sites on this are pretty black and white, but don't clearly address the
> grey areas. I think this is definitely a case of the persons making the
> laws don't understand the technology involved, which sadly seems to be
> the case across a lot of tech laws being passed world-wide of late :(
> 
> -- 
> Thanks,
> Ash

This is what I put on my site to address the Cookie issue:

http://sperling.com/contact.php

Do you think it would be enough?

Cheers,

tedd


_____________________
tedd.sperl...@gmail.com
http://sperling.com

--- End Message ---
--- Begin Message ---
On Tue, Jun 5, 2012 at 9:15 PM, Tedd Sperling <t...@sperling.com> wrote:
> On Jun 3, 2012, at 5:21 PM, Ashley Sheridan wrote:
>>
>> There is a new law been passed in the UK that makes non-essential cookies 
>> opt-in only, so you must get permission in order to use them.
>
> What's a non-essential cookie?
>
> Cheers,
>
> tedd

A cookie that can be removed without the site loosing essential functionality.


On Tue, Jun 5, 2012 at 9:20 PM, Tedd Sperling <t...@sperling.com> wrote:
> On Jun 4, 2012, at 6:13 PM, Ashley Sheridan wrote:
>>
>> Yeah, it's been such a pain, as nobody over here is quite sure how the
>> hell it'll be enforced either, or if it even will be. It's also pretty
>> vague as to just where the line gets drawn. The official government
>> sites on this are pretty black and white, but don't clearly address the
>> grey areas. I think this is definitely a case of the persons making the
>> laws don't understand the technology involved, which sadly seems to be
>> the case across a lot of tech laws being passed world-wide of late :(
>>
>> --
>> Thanks,
>> Ash
>
> This is what I put on my site to address the Cookie issue:
>
> http://sperling.com/contact.php
>
> Do you think it would be enough?
>
> Cheers,
>
> tedd
>

If the cookie is non-essential, you also need an option to 'opt-out'.

- Matijn

--- End Message ---
--- Begin Message ---
On Jun 1, 2012, at 1:44 PM, Ashley Sheridan wrote:

> This is a bit of a shameless plug, but it is a Friday and a pretty
> special weekend over here.
> 
> I recently got to work on something a bit fun at work in my spare time
> and they liked it so much that it got used internally to celebrate the
> jubilee weekend.
> 
> This is the result http://jubilee.themlondon.com 
> 
> For those of you interested, the leg-work is done by a bunch of PHP
> scripts run in the background via cron, split into 3 tasks:
> 
> 
>     1. A script goes out and searches Twitter for tweets that mention
>        the jubilee, one instance per keyword and records those to a DB
>        to limit the draw on the Twitter API
>     2. A second script goes over those tweets and pulls in all the
>        non-default profile images for each unique user
>     3. Lastly, the image is built as 12 separate tiles every half hour,
>        using PHP and GD to match the average colour of each profile pic
>        to a spot on the image, and then these are stitched together for
>        the final image
> 
> Anyway, hope you guys all have a great weekend, more so if you're
> unlucky enough to be working over the whole 4 days :-/
> 
> -- 
> Thanks,
> Ash
> http://www.ashleysheridan.co.uk
> 
> 

Just saw it -- far out!


Cheers,

tedd

PS: You Brits have too much free time on your hands. :-)


--- End Message ---
--- Begin Message ---
Hi All,

I am a basic user of PHP and I have need of reading the dynamic HTML form
field as a variable in PHP so it will be great if someone can share some
good link or snip for quick understanding.

Thanks,
Devang

--- End Message ---
--- Begin Message ---
> Hi All,
> 
> I am a basic user of PHP and I have need of reading the dynamic HTML form
> field as a variable in PHP so it will be great if someone can share some
> good link or snip for quick understanding.
> 
> Thanks,
> Devang


http://lmgtfy.com/?q=how+to+pass+and+receive+a+PHP+variable

When just starting out, "Google is your friend".

Or did I misunderstand your question?

-Govinda

--- End Message ---
--- Begin Message ---
On 2012-06-05, at 10:54 PM, Devangnp wrote:

> I know how to pass variable but having difficulties when I use the dynamic 
> form field in HTML that add more boxes as per user require.
> 

>>> Hi All,
>>> 
>>> I am a basic user of PHP and I have need of reading the dynamic HTML form
>>> field as a variable in PHP so it will be great if someone can share some
>>> good link or snip for quick understanding.
>>> 
>>> Thanks,
>>> Devang
>> 
>> 
>> http://lmgtfy.com/?q=how+to+pass+and+receive+a+PHP+variable
>> 
>> When just starting out, "Google is your friend".
>> 
>> Or did I misunderstand your question?
>> 
>> -Govinda


Devang,

Please keep replies on-list.
Please post your replies at the bottom, past the older (snipped) content.

Many here will be glad to help..  but you'll need to make your question more 
clear.. at least for me to be able to help anyway.
First of all, what do you mean exactly, by, "the dynamic form field in HTML"?  
And by "boxes" do you mean form inputs of 'text' type?  If so, then do you mean 
to suggest that input by the end user should determine the number of text 
inputs that should display in a second HTML form?  
Please spend more time describing what you are trying to do.. and also please 
show any code you attempt(ed) to accomplish this.  If you are unable to write 
any code, then try pseudo code - meaning write in successive lines of prose 
what you want code to do, and post that here. 

-Govinda

--- End Message ---
--- Begin Message ---
"Govinda" <govinda.webdnat...@gmail.com> wrote in message 
news:72497398-3a6c-4faa-89f2-565c18fd2...@gmail.com...

On 2012-06-05, at 10:54 PM, Devangnp wrote:

> I know how to pass variable but having difficulties when I use the dynamic 
> form field in HTML that add more boxes as per user require.
>

>>> Hi All,
>>>
>>> I am a basic user of PHP and I have need of reading the dynamic HTML 
>>> form
>>> field as a variable in PHP so it will be great if someone can share some
>>> good link or snip for quick understanding.
>>>
>>> Thanks,
>>> Devang
>>
>>
>> http://lmgtfy.com/?q=how+to+pass+and+receive+a+PHP+variable
>>
>> When just starting out, "Google is your friend".
>>
>> Or did I misunderstand your question?
>>
>> -Govinda


Devang,

Please keep replies on-list.
Please post your replies at the bottom, past the older (snipped) content.

Many here will be glad to help..  but you'll need to make your question more 
clear.. at least for me to be able to help anyway.
First of all, what do you mean exactly, by, "the dynamic form field in 
HTML"?  And by "boxes" do you mean form inputs of 'text' type?  If so, then 
do you mean to suggest that input by the end user should determine the 
number of text inputs that should display in a second HTML form?
Please spend more time describing what you are trying to do.. and also 
please show any code you attempt(ed) to accomplish this.  If you are unable 
to write any code, then try pseudo code - meaning write in successive lines 
of prose what you want code to do, and post that here.

-Govinda=

I thought he meant previously generated "array" type fields, that use the 
same name.  I've never done it myself, but  I thought the method of handling 
this kind of input included placing a hidden field with the count on the 
form to be retriieved later and used in processing the dynamic fields in a 
loop. 



--- End Message ---
--- Begin Message ---
On 06-06-2012 05:11, Jim Giner wrote:
"Govinda"<govinda.webdnat...@gmail.com>  wrote in message
news:72497398-3a6c-4faa-89f2-565c18fd2...@gmail.com...

On 2012-06-05, at 10:54 PM, Devangnp wrote:

I know how to pass variable but having difficulties when I use the dynamic
form field in HTML that add more boxes as per user require.


Hi All,

I am a basic user of PHP and I have need of reading the dynamic HTML
form
field as a variable in PHP so it will be great if someone can share some
good link or snip for quick understanding.

Thanks,
Devang


http://lmgtfy.com/?q=how+to+pass+and+receive+a+PHP+variable

When just starting out, "Google is your friend".

Or did I misunderstand your question?

-Govinda


Devang,

Please keep replies on-list.
Please post your replies at the bottom, past the older (snipped) content.

Many here will be glad to help..  but you'll need to make your question more
clear.. at least for me to be able to help anyway.
First of all, what do you mean exactly, by, "the dynamic form field in
HTML"?  And by "boxes" do you mean form inputs of 'text' type?  If so, then
do you mean to suggest that input by the end user should determine the
number of text inputs that should display in a second HTML form?
Please spend more time describing what you are trying to do.. and also
please show any code you attempt(ed) to accomplish this.  If you are unable
to write any code, then try pseudo code - meaning write in successive lines
of prose what you want code to do, and post that here.

-Govinda=

I thought he meant previously generated "array" type fields, that use the
same name.  I've never done it myself, but  I thought the method of handling
this kind of input included placing a hidden field with the count on the
form to be retriieved later and used in processing the dynamic fields in a
loop.



A possible answer to a possible question that he might have (yes, the question is very vaguely described, as Govinda already explained) would be the following:

Assuming you have an HTML form, which may contain a variable number of fields, you want to somehow access their passed-through values in PHP without prior knowledge of the exact number of those fields.

There are essentially 2 ways:
1. All POSTed data is present in the $_POST superglobal array. So you could just loop over that, ignore the fields you already knew were there, and the data remaining is then essentially the data you seek. The keys in the $_POST array are the fieldnames you are looking for.

2. There's a special trick in PHP, when you name a field "name[]" in HTML and then POST it to a PHP script, it will turn into an array field. So <input name="a[]" value="1"> <input name="a[]" value="2"> will then end up in:
$_POST = [
   'a' => [
      0 => '1',
      1 => '2'
   ]
]

If you had not added the square-brackets, you would have:
<input name="a" value="1"> <input name="a" value="2"> ending up in:
$_POST = [
   'a' => '2'
]
Thus not ever seeing the value '1'.

I hope this answers part of your question; and if not, PLEASE explain in more detail what your problem is, what you tried, why it didn't work, and what you want to know exactly. Your current question is very very short and vague enough to easily cause misunderstanding.

- Tul

--- End Message ---

Reply via email to