Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #19465

Re: 2D array by POST

From "J.O. Aho" <user@example.net>
Newsgroups comp.lang.php
Subject Re: 2D array by POST
Date 2023-05-18 23:44 +0200
Message-ID <kcnkirFh5ehU1@mid.individual.net> (permalink)
References <1qaxqzf.194a8511hkkk6aN%liz@poppyrecords.invalid.invalid> <kcn3tdFehn1U1@mid.individual.net> <u465s8$8kf$13@gallifrey.nk.ca>

Show all headers | View raw


On 5/18/23 23:38, The Doctor wrote:
> In article <kcn3tdFehn1U1@mid.individual.net>,
> J.O. Aho <user@example.net> wrote:
>> On 5/18/23 18:04, Liz Tuddenham wrote:
>>> I need to send a 2-dimensional array from one file to another by POST.
>>> The array is $item[][] with contents that are entirelyintegers.
>>>
>>> I have tried :
>>>    Print "<INPUT TYPE=hidden NAME=item[] VALUE=$item>";
>>> with
>>> $item = stripslashes($_POST['item']);
>>> but it does not work.
>>>
>>>    Any suggestions?
>>
>> 1. use session, store the value in the session and then use it in the
>> next page directly from the session.
>>
>> 2. serialize the variable and base64 encode the serialized data, post
>> this in the form and then base64 decode and unserialize.
>>
> 
> Is base64 strong enugh?

It's not about the encryption, it's about not making the html to break 
as you don't know what the serialized data may contain.

if the data is sensitive or you want to avoid user manipulation of the 
data, then store the data in session and that is way it was number 1 of 
the suggestions.

-- 
  //Aho

Back to comp.lang.php | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

2D array by POST liz@poppyrecords.invalid.invalid (Liz Tuddenham) - 2023-05-18 17:04 +0100
  Re: 2D array by POST "J.O. Aho" <user@example.net> - 2023-05-18 19:00 +0200
    Re: 2D array by POST liz@poppyrecords.invalid.invalid (Liz Tuddenham) - 2023-05-18 21:17 +0100
    Re: 2D array by POST doctor@doctor.nl2k.ab.ca (The Doctor) - 2023-05-18 21:38 +0000
      Re: 2D array by POST "J.O. Aho" <user@example.net> - 2023-05-18 23:44 +0200
        Re: 2D array by POST liz@poppyrecords.invalid.invalid (Liz Tuddenham) - 2023-05-19 07:19 +0100
          Re: 2D array by POST Jerry Stuckle <stuckle.jerry@gmail.com> - 2023-05-19 11:56 -0400
            Re: 2D array by POST "J.O. Aho" <user@example.net> - 2023-05-19 20:27 +0200
              Re: 2D array by POST "J.O. Aho" <user@example.net> - 2023-05-19 20:29 +0200
                Re: 2D array by POST Jerry Stuckle <stuckle.jerry@gmail.com> - 2023-05-19 23:55 -0400
              Re: 2D array by POST liz@poppyrecords.invalid.invalid (Liz Tuddenham) - 2023-05-19 20:38 +0100
                Re: 2D array by POST "J.O. Aho" <user@example.net> - 2023-05-19 23:58 +0200
                Re: 2D array by POST Arne Vajhøj <arne@vajhoej.dk> - 2023-05-19 21:42 -0400
                Re: 2D array by POST liz@poppyrecords.invalid.invalid (Liz Tuddenham) - 2023-05-20 08:56 +0100
                Re: 2D array by POST Stefan+Usenet@Froehlich.Priv.at (Stefan Froehlich) - 2023-05-20 08:53 +0000
              Re: 2D array by POST Jerry Stuckle <stuckle.jerry@gmail.com> - 2023-05-19 23:54 -0400
        Re: 2D array by POST Arne Vajhøj <arne@vajhoej.dk> - 2023-05-19 21:30 -0400
          Re: 2D array by POST Jerry Stuckle <stuckle.jerry@gmail.com> - 2023-05-20 00:06 -0400

csiph-web