an eddy in the bitstream

Author: Peter Karman (Page 28 of 76)

Maker of lunches.
Teller of stories.
Singer of songs.
Crafter of code.
Kicker of darkness.

POST with multiple values per key

Dumb. And bad.

PHP requires that you change your HTML to indicate that an input value in a form expects multiple values. That means, your HTML needs to know what your server-side architecture is coded in.

Dumb. And bad.

Example:

 <input name="foo" value="123" />
 <input name="foo" value="456" />

That code above won’t work in a POST to a .php script because one of the values for ‘foo’ will be dropped. Instead, you have to code your html like:

 
 <input name="foo[]" value="123" />
 <input name="foo[]" value="456" />

with that extra little [] bracket pair. That’s just Wrong. And bad. My HTML shouldn’t care what the server side language is. HTTP is HTTP. HTML is HTML. It’s agnostic. Unless your scripting language is broken. Like PHP is.

Ziggurat

Not a book but a short story in the latest issue of the New Yorker.

I usually like the fiction pieces in the NY but this particular story, in its surrealism, seemed to tell me a truth I already knew but had forgotten. I immediately sat down to google Stephen O’Connor (the author) to find out more. He sounds like a compelling person.

The religious nature of the story continues a recent trend in NY fiction. Last week’s story was also very compelling, a kind of Flannery O’Connor-esque morality tale. O’Connor. There’s another trend. I expect next week’s fiction piece to have an O’Connor connection as well.

Speaking of New Yorker threads, has anyone else noticed the subtle vocabulary threads in each issue, where a single uncommon word might appear in multiple pieces in the issue? The editors must enjoy finding those connections in their submissions.

« Older posts Newer posts »

© 2024 peknet

Theme by Anders NorenUp ↑