By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,614 Members | 1,662 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,614 IT Pros & Developers. It's quick & easy.

PEAR Auth embedded in HTML?

P: n/a
I've started playing with the Auth module, and I have a quick question
before I go any deeper. Is it possible to embedd the Auth login form
in an HTML page? I would like to put a login form in a sidebar of a
page. The problem seems to be that Auth relies on sessions, which
causes problems when the start() function sends header information.
Any suggestions and examples would be welcome.

/H
Sep 3 '08 #1
Share this Question
Share on Google+
3 Replies


P: n/a
On Sep 3, 4:31 pm, ha...@thyr.com wrote:
I've started playing with the Auth module, and I have a quick question
before I go any deeper. Is it possible to embedd the Auth login form
in an HTML page? I would like to put a login form in a sidebar of a
page.
use PHP include/require statements to include form saved on a separate
file
The problem seems to be that Auth relies on sessions, which
causes problems when the start() function sends header information.
Any suggestions and examples would be welcome.

/H
use output buffering, aka ob_start() function to deal with this or
rethink application design in such way that headers will always be
sent before any output.

Sep 4 '08 #2

P: n/a
On 3 Sep, 14:31, ha...@thyr.com wrote:
I've started playing with the Auth module, and I have a quick question
before I go any deeper. Is it possible to embedd the Auth login form
in an HTML page? I would like to put a login form in a sidebar of a
page. The problem seems to be that Auth relies on sessions, which
causes problems when the start() function sends header information.
Any suggestions and examples would be welcome.

/H
?
Yes.

Just include the lib at the top of the page, call session_start()
before writing the page then call Auth_Frontend_Html() where you want
the form to appear.

You could use output buffering if your include files are messy.

C.
Sep 4 '08 #3

P: n/a
Mi****************@gmail.com wrote:
On Sep 3, 4:31 pm, ha...@thyr.com wrote:
>I've started playing with the Auth module, and I have a quick question
before I go any deeper. Is it possible to embedd the Auth login form
in an HTML page? I would like to put a login form in a sidebar of a
page.

use PHP include/require statements to include form saved on a separate
file
>The problem seems to be that Auth relies on sessions, which
causes problems when the start() function sends header information.
Any suggestions and examples would be welcome.

/H

use output buffering, aka ob_start() function to deal with this or
rethink application design in such way that headers will always be
sent before any output.

output buffering is not a solution. It only hides the problem.

But just because Auth relies on sessions doesn't mean there is a
problem. You just need to call session_start() before any output to the
page.

However, the op hasn't shown us any code or errors messages, so it's
impossible to tell what his real problem is.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================

Sep 4 '08 #4

This discussion thread is closed

Replies have been disabled for this discussion.