[pmwiki-users] PHP 'Get From Name' queston...

The Editor editor at fast.st
Sun Oct 15 09:30:45 CDT 2006


On 10/15/06, Crisses <crisses at kinhost.org> wrote:
>
> On Oct 15, 2006, at 6:48 AM, The Editor wrote:
>
> > I've noticed there is a problem due to the extra authentication
> > measures taken to tighten up ZAP forms, that multiple forms on a page
> > conflict.  To fix it I need to be able to add a form name to each
> > form, and then retrieve it when the form is submitted.
> >
> > I've scoured the php site and couldn't find anything.  Maybe someone
> > hear know how to do it...  So if I have :
> >
> > (:input form name=ThisForm:)
> >
> > How do I get a hold of "ThisForm" in a recipe when the form is
> > submitted?
> >
> > Cheers,
> > Caveman
> Use a hidden variable.
>
> Naming the form probably won't work.
>
> <input name="index" type="hidden" value="value">
>
> $_POST['index'] = value;
>
>
> I tried but I don't see form name coming through.  It's probably
> there for JavaScript not $_POST variables.
>
> Crisses

Thanks Crisses. Surprizing you can't get the form name in php...  But
I did find a work around that was acutally easier.  I used the random
number used in authentication as the name for the session variable,
tweaked the code to work slightly different, and it solved the problem
perfectly.  Now you can have multiple ZAP forms on a page (and unless
they just happen to be assigned the same random number... there's no
problem).

Thanks again.  If someone does have a way to get the form name though
it would eliminate the 1 in 100000 possibility of a form clash...  : )

Cheers,
Caveman




More information about the pmwiki-users mailing list