Re: Curl with asp pages....
| From: | Andrew Ballard | Date: | Fri, 28 Nov 2008 15:23:50 +0000 |
| Subject: | Re: Curl with asp pages.... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-283902@lists.php.net to get a copy of this message | ||
On Fri, Nov 28, 2008 at 10:08 AM, <ceo@l-i-e.com> wrote:
>
>> There is a slight difference in how ASP handles multiple form fields
>> that share the same name (as well as SELECT MULTIPLE lists) such that
>> ASP does not need (and should not use) square brackets in field names
>> the way PHP does.
>
> Alas, not only doesn't it need them, it CANNOT use them, so you are stuck if you want to
> do something such as:
>
> name="foo[1]" value="17"
> name="foo[5]" value="47"
> name="foo[17]" value="32"
>
> I was quite disappointed when I found out that ASP simply could not maintain a simple key-value
> pairing without jumping through hoops...
Having worked in PHP long enough to realize the value of what you are
talking about, I can see a use for it. It still seems odd to me,
though. :-)
> It made for a whole 'nother verse in my "Microsoft Sucks" song strewn throughout
> the code comments of that ASP project.
LOL
> Another verse was "Boolean expressions don't short-circuit"
> :-)
Yeah, that got me for a while when I first started working in ASP
after PHP and JavaScript. What a pain.
> Ah, and "Can't moveFirst in an empty record set" was another.
Well, I got used to checking for EOF and/or BOF before trying to move
around. Once I got used to it, I didn't find it that big of a deal.
For those accustomed to PHP, there are a couple methods on the
recordset object that will make things more familiar. One implodes the
recordset with cell and row delimiters that are useful for packing the
data into a CSV (providing that a value doesn't have commas or double
quotes that need escaped); the other turns the recordset into a
multi-dimensional array. As I recall, though, the indexes are
"reversed".
> Sadly, the song is lost as I failed to make a copy of that codebase before I moved on to
> another task.
Sadly? Are you really pining for it? :-)
Andrew