|
Pete, I had the same idea, but can't seem to get it to work. My code is
below - Form1 does connect successfully, but the 15_query in Form2 fails
with a "No Default Connection found" error. Here's what I am doing, maybe
you can see the problem:
form1
----------
session_start ()
include login.php
lots of code
submit action=form2
form2
----------
session_start ()
$sql_result = i5_query ($searchstring, $_SESSION["Connection"]);
login.php
-----------------
$host = '192.168.x.x';
$user = 'xxxx';
$password = 'xxx';
$connection = i5_connect($host, $user, $password, array
(I5_OPTIONS_INITLIBL=>"QTEMP, QGPL, KAGPL, CLIENTGPL, TAATOOL, TWUFP,
TWUPP"));
if (!$connection) {
die ("Could not connect to database " );
}
$_SESSION["Connection"] = $connection;
Larry Kleinman
Kleinman Associates, Inc.
212-949-6469
203-255-4100
From: Pete Helgren<pete@xxxxxxxxxx>
To: Web Enabling the AS400 / iSeries<web400@xxxxxxxxxxxx>
Date: 03/03/2011 03:02 PM
Subject: Re: [WEB400] persistent sign on for Zend Server
Sent by: web400-bounces@xxxxxxxxxxxx
The technique I use is to use the user id and password to connect and
then make the connection object part of the session variable and use
that connection object when I need it.
Pete Helgren
Value Added Software, Inc
www.asaap.com
www.opensource4i.com
On 3/3/2011 12:18 PM, Larry Kleinman wrote:
Using Zend Server, I would like to present a sign-on screen where theuser
enters a user ID and password to be used as the parms of the i5_connectonce,
function. This is not hard, but I want to present that screen only
and use that info as the user moves from screen to screen, all of whichthe
will require a 15_connection. I know that I can store the user and
password entered as $_SESSION variables, but I don;t like the idea of
password being written to some place on the PC hard drive. (That's how
$_SESSION works, right?). Any suggestions on how to deal with this.
Larry Kleinman
Kleinman Associates, Inc.
212-949-6469
203-255-4100
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.