[pmwiki-users] Misc FAST Data questions

The Editor editor at fast.st
Tue Sep 12 15:20:52 CDT 2006

Sorry about omitting the password code.  I included it below.  Also a
question on your answer to point one.  Thanks for the information Pm.


On 9/12/06, Patrick R. Michaud <pmichaud at pobox.com> wrote:
> On Tue, Sep 12, 2006 at 01:56:48PM -0400, The Editor wrote:
> > 1) Multiple buttons.
> > how do I distinguish between which button is
> > pushed?  Right now I process the form info using a line like the
> > following succeeded by a bunch of specific if statements:
> >
> >       foreach ($_POST as $field => $value) {
> That's effectively the easiest way to do it.  You can give each
> button the same name with a different value and figure it out that
> way, but this doesn't work well for i18n (which is why PmWiki actually
> uses separate names for each button and checks them individually).

Can you explain what you mean by using separate names?  I think that
may be a better solution for me.  Especially if I could pass in some
value beside the button display. Ideally, each submit button would be
able to set some field and some value and display something different
still.  Is that possible?

> > 2) Passwd's and authentication.
> > Could anyone
> > explain what variables I need to pass into PmWikiAuth() to get password permissions and whether or
> > not I need to still use AuthUserId()?  Here's my existing relevant
> > code:

		if ($field == "login") {
			$dp = $dataprofiles . "." . $_POST[member];
			$pass1 = GetData($dp,"Passwd");
			$pass2 = $_POST['passwd'];
			if ($pass1 == $pass2) {			
				AuthUserId($pagename, $_POST['member']);
				$m .= "You have been successfully logged in.  ";
			else $m .= "Incorrect member name or password.";

More information about the pmwiki-users mailing list