NYCPHP Meetup

NYPHP.org

[nycphp-talk] Form names

FB` fb at intldef.org
Tue Dec 10 20:18:12 EST 2002


Do you have access to the route used to get to the forms page?

I'm thinking you might be able to wrap their html in a frame, and address
the forms, as Jessica described, from a script within the frame.

This also suggests just pulling in their html file into your PHP, and
inserting the hidden fields you need at specific points...

FB`


----- Original Message -----
From: "Oktay Altunergil" <nyphp at altunergil.com>
To: "NYPHP Talk" <talk at nyphp.org>
Sent: Tuesday, December 10, 2002 4:30 PM
Subject: Re: [nycphp-talk] Form names


> I thought about this too.. But would you be able to address the forms like
this on the 'submit' page?
>
> Aren't these only available where the forms themselves are? If yes, then
we're back to "I can't modify the HTML".
>
> oktay
>
> On Tue, 10 Dec 2002 16:25:26 -0500
> jessica kelly <jkelly at sussex.cc.nj.us> wrote:
>
> > If you can use Javascript try
> >
> > document.forms[0]. whatever for first form on page
> > document.forms[1]. whatever for second form on page
> > etc......
> >
> > Jessica
> >
> >
> > >>> jellicle at inch.com 12/10/02 3:51:20 PM >>>
> > On Tuesday 10 December 2002 15:05 pm, Timothy P Sailer wrote:
> >
> > > That's what I'm trying to do. My question is *how* to do this in PHP.
> > > I'm completely stumped on this one. Mainly because this is so stupid
> > > that I have do this, and I'm pissed.
> >
> > Look, this is straightforward.  On the receiving page, all you have is
> > the form variables and the action= URL.  That's it.  If there's a
> > difference between those variables, you can tell the forms apart.  If
> > not, you can't.  Period, full stop.  If someone writes an (idiotic) form
> > like this:
> >
> > ----------------------------------------
> >
> > Enter employee ID to fire:
> >
> > <FORM ACTION="process.cgi">
> > <INPUT NAME="ID" TYPE="text">
> > <INPUT TYPE="submit" VALUE="submit">
> > </FORM>
> >
> > Enter employee ID to promote:
> >
> > <FORM ACTION="process.cgi">
> > <INPUT NAME="ID" TYPE="text">
> > <INPUT TYPE="submit" VALUE="submit">
> > </FORM>
> >
> > ----------------------------------------
> >
> > . then you can't tell them apart, period.  Quit trying.  It's their
> > fault.  The form needs to be changed.  The typical approaches are to
> > modify the action= URL, or add a hidden form field.
> >
> > <INPUT TYPE="hidden" NAME="formaction" VALUE="promote">
> >
> > <FORM ACTION="process.cgi?formaction=promote">
> >
> >
> > --
> > Michael Sims
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
>
>
> --- Unsubscribe at http://nyphp.org/list/ ---
>
>
>




More information about the talk mailing list