Re: [PHP-DB] Sessions help needed !!!

2006-02-17 Thread Micah Stevens

Well, not much to go on, but I'd check variable scope, and register-globals. 
The latter being more likely as I can't see how the scope would change if 
you're just copying things over. 

-Micah 

On Friday 17 February 2006 2:18 pm, Chris Payne wrote:
> Hi there everyone,
>
> OK this script worked perfectly on my own apache webserver and I had to
> move it to the main live server, but for some reason it's not passing
> session values in the same way and i'm positive it's something damn
> obvious.
>
> On my server I can use:
>
> echo $credits_system;
> echo $credits_left;
> echo $foldername;
>
> To display the information to make sure it is being passed, but it returns
> blank on their server (Same versions of everything except I didn't install
> it so it may have something turned off in the config - which i don't have
> control over, sigh).  The thing is, the last one - $foldername I MUST have
> access to as the database uses this as a reference for searches and without
> this working I can't pull the data I need ($foldername is an ID and also
> refers to physical folders/directories on the apache webserver for video
> files).
>
> Is there some obvious that I can check to see what's going on that I can't
> think about right now?
>
> Any help or pointers would be really appreciated.
>
> Chris

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Sessions help needed !!!

2006-02-17 Thread Chris Payne
Hi there everyone,
 
OK this script worked perfectly on my own apache webserver and I had to move
it to the main live server, but for some reason it's not passing session
values in the same way and i'm positive it's something damn obvious.
 
On my server I can use:
 
echo $credits_system;
echo $credits_left;
echo $foldername;
 
To display the information to make sure it is being passed, but it returns
blank on their server (Same versions of everything except I didn't install
it so it may have something turned off in the config - which i don't have
control over, sigh).  The thing is, the last one - $foldername I MUST have
access to as the database uses this as a reference for searches and without
this working I can't pull the data I need ($foldername is an ID and also
refers to physical folders/directories on the apache webserver for video
files).
 
Is there some obvious that I can check to see what's going on that I can't
think about right now?
 
Any help or pointers would be really appreciated.
 
Chris


Re: [PHP-DB] sessions

2004-12-09 Thread Warren Mason

Thanks to everyone that replied. All working great now thanks. 

Warren



>>> Jochem Maas <[EMAIL PROTECTED]> 10/12/2004 2:47:28 pm >>>

try using the $_SESSION superglobal var (google is your friend if its 
new to you.)

no need to register (still need to do session_start() though) just
do...

$_SESSION['MyValue'] = array(
'name'  => $username,
'level' => $account_level
);

...or something like that. (also works for objects - which is only gets

really cool in php5 - be aware that classes for objects stored in your

session should be loaded BEFORE you start the session.)

Warren Mason wrote:
> I am attempting to get information from a mysql database and then
use
> this in a session. Is there a trick to using sessions? For example,
can
> something like below be placed anywhere in a script? (I have the 
> session_start(); at the very top of my page.)  
> 
> 
> 
>   session_register( "session_username" ); 
>   session_register( "session_level" );  
>  
>  $session_username = "$username";
>  $session_level = "$account_level"; 
> 
> 
> The resulting session is
> 
> session_username|N;session_level|i:0;
> 
> $username is set to warren and $account_level is set to 255.
> 
> Any help would be greatly appreciated as I have gone through about 5
> books and searched the net and can't find an answer as to why this
isn't
> working.
> 
> 
> -
> This message is intended for the addressee named and may contain
> confidential information. If you are not the intended recipient,
please
> delete it and notify the sender. Views expressed in this message are
> those of the individual sender and are not necessarily the views of
the
> Mid Western Area Health Service.
> -
> <<<>>>
> 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] sessions

2004-12-09 Thread Jochem Maas
try using the $_SESSION superglobal var (google is your friend if its 
new to you.)

no need to register (still need to do session_start() though) just do...
$_SESSION['MyValue'] = array(
'name'  => $username,
'level' => $account_level
);
...or something like that. (also works for objects - which is only gets 
really cool in php5 - be aware that classes for objects stored in your 
session should be loaded BEFORE you start the session.)

Warren Mason wrote:
I am attempting to get information from a mysql database and then use
this in a session. Is there a trick to using sessions? For example, can
something like below be placed anywhere in a script? (I have the 
session_start(); at the very top of my page.)  


  session_register( "session_username" ); 
  session_register( "session_level" );  
 
 $session_username = "$username";
 $session_level = "$account_level"; 

The resulting session is
session_username|N;session_level|i:0;
$username is set to warren and $account_level is set to 255.
Any help would be greatly appreciated as I have gone through about 5
books and searched the net and can't find an answer as to why this isn't
working.
-
This message is intended for the addressee named and may contain
confidential information. If you are not the intended recipient, please
delete it and notify the sender. Views expressed in this message are
those of the individual sender and are not necessarily the views of the
Mid Western Area Health Service.
-
<<<>>>
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP-DB] sessions

2004-12-09 Thread Warren Mason
I am attempting to get information from a mysql database and then use
this in a session. Is there a trick to using sessions? For example, can
something like below be placed anywhere in a script? (I have the 
session_start(); at the very top of my page.)  



  session_register( "session_username" ); 
  session_register( "session_level" );  
 
 $session_username = "$username";
 $session_level = "$account_level"; 


The resulting session is

session_username|N;session_level|i:0;

$username is set to warren and $account_level is set to 255.

Any help would be greatly appreciated as I have gone through about 5
books and searched the net and can't find an answer as to why this isn't
working.


-
This message is intended for the addressee named and may contain
confidential information. If you are not the intended recipient, please
delete it and notify the sender. Views expressed in this message are
those of the individual sender and are not necessarily the views of the
Mid Western Area Health Service.
-
<<<>>>

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Sessions, Cookies and other

2004-03-19 Thread Craig Hoffman
Hi there,
I have a script where the administrator of the site can add / edit / 
delete records.  Here's how its works:  basically the admin selects a 
user from a drop down menu and hits submit.  This goes to a page where 
it queries the DB and returns some basic info - name, email address and 
so on.

For example:  You selected Jim Shoe - his email address is [EMAIL PROTECTED]

The problem I am having is when the user returns to this "hub" page 
from editing a record or adding record it comes back blank.  How can I 
get to show the information again?   Are sessions and cookies the 
answer?  Any insight on how to do this  is  appreciated.

Thanks Craig

__
Craig Hoffman - eClimb Media
v: (847) 644 - 8914
f: (847) 866 - 1946
e: [EMAIL PROTECTED]
w: www.eclimb.net
_
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP-DB] Sessions and input form

2003-11-24 Thread Aleks @ USA.net
 Dear Jeffrey,

Yes that is clear thank you... I have used this technique in the past
But wanted to give sessions a try. I did manage to get it working. Seems
That typing code at midnight can lead to frustrating and volatile results..

Thanks again for your response... 

Aleks

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 24, 2003 12:30 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] Sessions and input form

Dear Aleks:

What I usually do for a situation like this is...

1) User fills out form and data is INSERTed into the table. If you use
auto_increment for the row id, use PHP's mysql_insert_id to get the id and
use this for step 2.

2) Page confirms data by SELECTing the data from the MySQL table and
inserting it into the form. 

3) If the user makes changes, it is UPDATEd in the MySQL table.

I hope this is clear.

Good luck,

Jeffrey Baumgartner

> Hi all,
> 
> I have a form that when populated and submitted is entered into a MySQL
dB.
> What I would like to do is be able to present the submitter with a 
> confirmation page listing the information from the form and then ask 
> them to confirm their submission. Also, if there is a problem or want 
> to change something, they can use the browser back button to go to the 
> previous page and make corrections.
> 
> At first I thought that using Sessions to add the form values would 
> allow this to work.. I have gone threw this twice since last night and 
> find that my logic is flawed... It works once... then when another 
> submissions is attempted the process hangs and returns a CGI timeout.
> 
> I am by no means a newbie but obviously I am not doing something right 
> with regards to session use. So I ask you more knowledgeable then I 
> for your input and advise. In hind sight I think my problem is that 
> once the information is confirmed and supposed to be entered into the 
> dB I am not destroying the session... Like I said, I think my approach 
> is all wrong here. I already have a login routine that uses sessions 
> and works flawlessly..[at least in appearance].
> 
> Any help would be very much appreciated.
> 
> TYIA
> 
> Aleks
> 
> --
> PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: 
> http://www.php.net/unsub.php

--
PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit:
http://www.php.net/unsub.php

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] Sessions and input form

2003-11-24 Thread jeffreyb
Dear Aleks:

What I usually do for a situation like this is...

1) User fills out form and data is INSERTed into the table. If you use 
auto_increment for the row id, use PHP's mysql_insert_id to get the id and 
use this for step 2.

2) Page confirms data by SELECTing the data from the MySQL table and 
inserting it into the form. 

3) If the user makes changes, it is UPDATEd in the MySQL table.

I hope this is clear.

Good luck,

Jeffrey Baumgartner

> Hi all,
> 
> I have a form that when populated and submitted is entered into a MySQL dB.
> What I would like to do is be able to present the submitter with a
> confirmation page listing the information from the form and then ask them to
> confirm their submission. Also, if there is a problem or want to change
> something, they can use the browser back button to go to the previous page and
> make corrections.
> 
> At first I thought that using Sessions to add the form values would allow this
> to work.. I have gone threw this twice since last night and find that my logic
> is flawed... It works once... then when another submissions is attempted the
> process hangs and returns a CGI timeout.
> 
> I am by no means a newbie but obviously I am not doing something right with
> regards to session use. So I ask you more knowledgeable then I for your input
> and advise. In hind sight I think my problem is that once the information is
> confirmed and supposed to be entered into the dB I am not destroying the
> session... Like I said, I think my approach is all wrong here. I already have
> a login routine that uses sessions and works flawlessly..[at least in
> appearance].
> 
> Any help would be very much appreciated.
> 
> TYIA
> 
> Aleks
> 
> -- 
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Sessions and input form

2003-11-23 Thread Aleks Kalynovych
Hi all,

I have a form that when populated and submitted is entered into a MySQL dB.
What I would like to do is be able to present the submitter with a
confirmation page listing the information from the form and then ask them to
confirm their submission. Also, if there is a problem or want to change
something, they can use the browser back button to go to the previous page and
make corrections.

At first I thought that using Sessions to add the form values would allow this
to work.. I have gone threw this twice since last night and find that my logic
is flawed... It works once... then when another submissions is attempted the
process hangs and returns a CGI timeout.

I am by no means a newbie but obviously I am not doing something right with
regards to session use. So I ask you more knowledgeable then I for your input
and advise. In hind sight I think my problem is that once the information is
confirmed and supposed to be entered into the dB I am not destroying the
session... Like I said, I think my approach is all wrong here. I already have
a login routine that uses sessions and works flawlessly..[at least in
appearance].

Any help would be very much appreciated.

TYIA

Aleks

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] Sessions and MySQL?

2003-10-16 Thread Tristan . Pretty
Cheers to everyone...
the curly brackets was me not thinking after a boozy lunch, and trying to 
recreate code, on an E-mail..
anyhoo...
I thought the best idea, and the simplest for me, was to remove the ' from 
the session recall
Turning $_SESSION['salutation']   --> INTO --> $_SESSION[salutation]

Cheers all...
it's clear as day now...
aint it always the way eh?

Tris...



George Patterson <[EMAIL PROTECTED]> wrote on 16/10/2003 14:15:54:

> On Thu, 16 Oct 2003 13:33:28 +0100
> [EMAIL PROTECTED] wrote:
> 
> > Not sure if this is a MySQL Q. or a PHP one, but here goes...
> > 
> > I'm just learning sessions...
> > And I'm trying to add a session variable to a MySQL database.
> > I've done this page that takes the results from a previous form...
> > But I get this error:
> > Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or 
> > `T_NUM_STRING' 
> > On line 83
> > Which is the line that relates to the line:
> > \"$_SESSION['salutation'];\", 
> > 
> > I've tried removing the ';' but it change nothing...?
> > Can anyone see my error?
> > 
> 
> Tristan,
> 
> yes, You are alternating between curly braces {} and parenethes ()
> (spelling??). Also you forgot to the closing double quotes when
> completeing the mysql_query statement.
> 
> You could also put the insert statement into a vairable and echo that to
> the screen. That way if you can't see the error, paste the query text
> into the mysql command line client.
> 
> See my alterations to you code below..
> 
> Regards
> 
> 
> George Patterson
> 
> > =
> >  > session_start();
> > header("Cache-control: private");
> > 
> >$_SESSION['salutation'] = $_POST['salutation'];
> > 
> > //MySQL connection stuff
> > mysql_query("INSERT INTO $table (
> > salutation,
> > name,
> > city
> > ) VALUES (
> > \"$_SESSION['salutation'];\", 
> > \"$_SESSION['name'];\", 
> > \"$_SESSION['city'];\"
> > )";
> > 
> > ?>
> > //Rest of page... thanks etc...
> 
> -- 
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above.  
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***



Re: [PHP-DB] Sessions and MySQL?

2003-10-16 Thread George Patterson
On Thu, 16 Oct 2003 13:33:28 +0100
[EMAIL PROTECTED] wrote:

> Not sure if this is a MySQL Q. or a PHP one, but here goes...
> 
> I'm just learning sessions...
> And I'm trying to add a session variable to a MySQL database.
> I've done this page that takes the results from a previous form...
> But I get this error:
> Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or 
> `T_NUM_STRING' 
> On line 83
> Which is the line that relates to the line:
> \"$_SESSION['salutation'];\", 
> 
> I've tried removing the ';' but it change nothing...?
> Can anyone see my error?
> 

Tristan,

yes, You are alternating between curly braces {} and parenethes ()
(spelling??). Also you forgot to the closing double quotes when
completeing the mysql_query statement.

You could also put the insert statement into a vairable and echo that to
the screen. That way if you can't see the error, paste the query text
into the mysql command line client.

See my alterations to you code below..

Regards


George Patterson

> =
>  session_start();
> header("Cache-control: private");
> 
>$_SESSION['salutation'] = $_POST['salutation'];
> 
> //MySQL connection stuff
> mysql_query("INSERT INTO $table (
> salutation,
> name,
> city
> ) VALUES (
> \"$_SESSION['salutation'];\", 
> \"$_SESSION['name'];\", 
> \"$_SESSION['city'];\"
> )";
> 
> ?>
> //Rest of page... thanks etc...

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] Sessions and MySQL?

2003-10-16 Thread Michael.J.Bourke
Eeek, didn't notice your brackets.  They're a bit messed up as well.  

mysql_query("INSERT INTO $table (salutation, name, city) 
VALUES (\"".$_SESSION['salutation']."\", \"".$_SESSION['name']."\",
\"".$_SESSION['city']."\");");

This MIGHT work :-)

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Sent: 16 October 2003 13:33
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Sessions and MySQL?


Not sure if this is a MySQL Q. or a PHP one, but here goes...

I'm just learning sessions...
And I'm trying to add a session variable to a MySQL database.
I've done this page that takes the results from a previous form...
But I get this error:
Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or 
`T_NUM_STRING' 
On line 83
Which is the line that relates to the line:
\"$_SESSION['salutation'];\", 

I've tried removing the ';' but it change nothing...?
Can anyone see my error?

=

//Rest of page... thanks etc...
=

*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above.  
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] Sessions and MySQL?

2003-10-16 Thread Michael.J.Bourke
Try this instead:

mysql_query("INSERT INTO $table (
salutation,
name,
city
} VALUES {
\"".$_SESSION['salutation']."\", 
\"".$_SESSION['name']."\", 
\"".$_SESSION['city']."\"
}

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Sent: 16 October 2003 13:33
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Sessions and MySQL?


Not sure if this is a MySQL Q. or a PHP one, but here goes...

I'm just learning sessions...
And I'm trying to add a session variable to a MySQL database.
I've done this page that takes the results from a previous form...
But I get this error:
Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or 
`T_NUM_STRING' 
On line 83
Which is the line that relates to the line:
\"$_SESSION['salutation'];\", 

I've tried removing the ';' but it change nothing...?
Can anyone see my error?

=

//Rest of page... thanks etc...
=

*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above.  
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] Sessions and MySQL?

2003-10-16 Thread Hutchins, Richard
In addition to what John suggested, I see you have switched from parens to
curly braces when you close your list of columns and list of values. AFAIK,
you need to use parens to contain those lists.

> -Original Message-
> From: CPT John W. Holmes [mailto:[EMAIL PROTECTED]
> Sent: Thursday, October 16, 2003 9:08 AM
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: Re: [PHP-DB] Sessions and MySQL?
> 
> 
> From: <[EMAIL PROTECTED]>
> 
> > And I'm trying to add a session variable to a MySQL database.
> > I've done this page that takes the results from a previous form...
> > But I get this error:
> > Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or 
> > `T_NUM_STRING' 
> > On line 83
> > Which is the line that relates to the line:
> > \"$_SESSION['salutation'];\", 
> > 
> > I've tried removing the ';' but it change nothing...?
> > Can anyone see my error?
> > 
> > =
> >  > session_start();
> > header("Cache-control: private");
> > 
> >$_SESSION['salutation'] = $_POST['salutation'];
> > 
> > //MySQL connection stuff
> > mysql_query("INSERT INTO $table (
> > salutation,
> > name,
> > city
> > } VALUES {
> > \"$_SESSION['salutation'];\", 
> \"{$_SESSION['salutation']}\",
> > \"$_SESSION['name'];\", 
> \"{$_SESSION['name']}\",
> > \"$_SESSION['city'];\"
> \"{$_SESSION['city']\",
> > }
> 
> ---John Holmes...
> 
> -- 
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] Sessions and MySQL?

2003-10-16 Thread CPT John W. Holmes
From: <[EMAIL PROTECTED]>

> And I'm trying to add a session variable to a MySQL database.
> I've done this page that takes the results from a previous form...
> But I get this error:
> Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or 
> `T_NUM_STRING' 
> On line 83
> Which is the line that relates to the line:
> \"$_SESSION['salutation'];\", 
> 
> I've tried removing the ';' but it change nothing...?
> Can anyone see my error?
> 
> =
>  session_start();
> header("Cache-control: private");
> 
>$_SESSION['salutation'] = $_POST['salutation'];
> 
> //MySQL connection stuff
> mysql_query("INSERT INTO $table (
> salutation,
> name,
> city
> } VALUES {
> \"$_SESSION['salutation'];\", 
\"{$_SESSION['salutation']}\",
> \"$_SESSION['name'];\", 
\"{$_SESSION['name']}\",
> \"$_SESSION['city'];\"
\"{$_SESSION['city']\",
> }

---John Holmes...

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Sessions and MySQL?

2003-10-16 Thread Tristan . Pretty
Not sure if this is a MySQL Q. or a PHP one, but here goes...

I'm just learning sessions...
And I'm trying to add a session variable to a MySQL database.
I've done this page that takes the results from a previous form...
But I get this error:
Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or 
`T_NUM_STRING' 
On line 83
Which is the line that relates to the line:
\"$_SESSION['salutation'];\", 

I've tried removing the ';' but it change nothing...?
Can anyone see my error?

=

//Rest of page... thanks etc...
=

*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above.  
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***



[PHP-DB] Sessions help needed!

2003-07-05 Thread John Fuller

Hello all, 
I am new to php in general and am trying to set up a user authentification system 
with mysql.  The registration page works well and sends all of the data to the 
appropriate table in mysql.  However, when I try to get the registered user to log in 
and start a session, the system will not remember the session information past the 
page.  For instance, this page will not work (the one that initially is supposed to 
register the session from the login form):
 
";
 include 'login.php';
 exit();
}
mysql_connect(localhost,$username);
@mysql_select_db($database) or die( "Unable to select database");
$sql=mysql_query("SELECT * FROM login WHERE login='$login' AND password='$password'");
$login_check = mysql_num_rows($sql);
if($login_check > 0){
  // This is where I register the session
  session_register('login');
  $_SESSION['login'] = $login;  
  mysql_close();
include 'success.php';
} else {
 echo "You could not be logged in! Either the username and password do not match or 
you have not validated your membership!
 Please try again!";
 include 'login.php';
}
?>
 
It proceeds to login the user for that page (I know this happens because I have played 
around with it looking at the error checks), but it will not display any variable that 
resembles "$_SESSION['login']".  
The next page sequentially (success.php) looks like this:
 

 
Any and all variations of this page come up blank and white whenever the variable 
$_SESSION['login'] is called to display. It shows no memory of me registering a 
session.  Any variation of quotes verse apostrophes changes nothing, so I figure that 
either I am blatantly screwing up the session code (possible for I have never written 
any sessions before) or my system is not supporting sessions.  I have a php4 
something, windows, apache 1.3.27 for my home network server, and mysql.  Any help on 
this problem would be greatly appreciated.  
Thanks a lot for your time, John




-
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!

Re: [PHP-DB] SESSIONS

2003-02-26 Thread mike karthauser
on 26/2/03 12:58 pm, MaN at [EMAIL PROTECTED] wrote:

> And also use $_POST[SUBMIT] or set register_globals On

Just use $_POST[SUBMIT]

register_globals was turned off for security reasons. You are compromising
the security of your system if you turn it back on.
-- 
Mike Karthauser 
Managing Director - Brightstorm Ltd

Email   >> [EMAIL PROTECTED]
Web >> http://www.brightstorm.co.uk
Tel >> 0117 9426653 (office)
   07939 252144 (mobile)

Snailmail   >> Unit 8, 14 King Square,
   Bristol BS2 8JJ


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] SESSIONS

2003-02-26 Thread MaN
And also use $_POST[SUBMIT] or set register_globals On



> You need to register you varible first with the session
>
> -Original Message-
> From: David Rice [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, February 25, 2003 3:10 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP-DB] SESSIONS
>
>
>
> Here's something i can't get working it won't go to the last clause of
this
> page i don't think it can set the session variable
>
> anyone see what im doing wrong? i need more caffeine to get my brain fired
> up today lol..
>
> ===
>
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>
>  }
> elseif($SUBMIT){
> $_SESSION["name"] = $HTTP_POST_VARS["name"];
> ?>
>  next 
>  }
> elseif( ( $SUBMIT ) && (  isset ( $_SESSION["name"] ) ) ) {
> echo $_SESSION["name"];
> }
> ?>
> 
> 
>
>
>
>
> _
> Stay in touch with absent friends - get MSN Messenger
> http://messenger.msn.co.uk
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] SESSIONS

2003-02-25 Thread Dennis Cole
You need to register you varible first with the session

-Original Message-
From: David Rice [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 25, 2003 3:10 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] SESSIONS



Here's something i can't get working it won't go to the last clause of this
page i don't think it can set the session variable

anyone see what im doing wrong? i need more caffeine to get my brain fired
up today lol..

===













 next 







_
Stay in touch with absent friends - get MSN Messenger
http://messenger.msn.co.uk


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] SESSIONS

2003-02-25 Thread David Rice
Here's something i can't get working it won't go to the last clause of this 
page i don't think it can set the session variable

anyone see what im doing wrong? i need more caffeine to get my brain fired 
up today lol..

===












 next 





_
Stay in touch with absent friends - get MSN Messenger 
http://messenger.msn.co.uk

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP-DB] Sessions and Temporary Tables

2003-02-01 Thread John W. Holmes
> I'm trying to create a temporary table through a query call in php and
> have no guiding documentation to refer to.  I assume it can be created
> as any other query call.  I would use CREATE INSERT but the insert
data
> is coming from a while loop.  I understand that the temporary table
> requires registration as a session to ensure it is dropped after the
> session is closed.  Does this mean I would need to simply register the
> name of the table.

You create a temporary table just like you would any other...

CREATE TEMPORARY TABLE table_name (id int, name varchar(20), ...
Or
CREATE TEMPORARY TABLE table_name SELECT ... FROM other_table

After it's created, within the same script _only_ you can do regular
INSERTS, UPDATES, SELECTS, whatever...

> All aspects of the code are apparently working fine.  No errors.  When
I
> use a SELECT statement and attempt to display the contents of the
table,
> I only get the html headers for the table but no data.  When I attempt
> to DESCRIBE the table directly from the mysql command line - it does
not
> exist.

If it's created from within your script, then you won't be able to see
if from the command line as the temporary table is specific to the
connection. The script and the command line are two different
connections and can't see each others temporary tables...

---John Holmes...



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] Sessions and Temporary Tables

2003-02-01 Thread Michael Conway
I'm trying to create a temporary table through a query call in php and
have no guiding documentation to refer to.  I assume it can be created
as any other query call.  I would use CREATE INSERT but the insert data
is coming from a while loop.  I understand that the temporary table
requires registration as a session to ensure it is dropped after the
session is closed.  Does this mean I would need to simply register the
name of the table.

 

All aspects of the code are apparently working fine.  No errors.  When I
use a SELECT statement and attempt to display the contents of the table,
I only get the html headers for the table but no data.  When I attempt
to DESCRIBE the table directly from the mysql command line - it does not
exist.

 

Michael Conway

[EMAIL PROTECTED]

(703) 968-8875

 




RE: [PHP-DB] Sessions problems

2003-01-06 Thread Ford, Mike [LSS]
> -Original Message-
> From: Sabina Alejandr Schneider [mailto:[EMAIL PROTECTED]]
> Sent: 05 January 2003 20:17
> 
> Hello everybody
> I was trying to use Sessions, but I had some problems. 
> 
> I have an old version of the Apache, that comes with the 
> Red Hat 7.2.
> 
> when executing this in my page:
> 
> session_start();
> if(!isset($_SESSION['s_test'])){
> $_SESSION['s_prueba']=1;
> }
> 
> There appear this in the page:
> Warning: Cannot send session cookie - headers already sent 
> by (output started at /var/www/html/prueba/index.php:8) in 
> /var/www/html/prueba/index.php on line 10

Well, the error message really says it all, it's just worded a bit opaquely!  
Basically, setting a cookie uses an HTTP header, and all HTTP headers have to be sent 
before your actual page content -- and the error message is saying that you can't send 
an HTTP header at line 10 of your script, because you started outputting your page 
content at line 8.

> Warning: Cannot send session cache limiter - headers 
> already sent (output started at 
> /var/www/html/prueba/index.php:8) in 
> /var/www/html/prueba/index.php on line 10

Same thing, but for a cache limiter header.

You need to re-order your script so that the header requests come before the start of 
real output.

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] Sessions problems

2003-01-05 Thread Sabina Alejandr Schneider
Hello everybody
I was trying to use Sessions, but I had some problems. 

I have an old version of the Apache, that comes with the 
Red Hat 7.2.

when executing this in my page:

session_start();
if(!isset($_SESSION['s_test'])){
   $_SESSION['s_prueba']=1;
}

There appear this in the page:
Warning: Cannot send session cookie - headers already sent 
by (output started at /var/www/html/prueba/index.php:8) in 
/var/www/html/prueba/index.php on line 10

Warning: Cannot send session cache limiter - headers 
already sent (output started at 
/var/www/html/prueba/index.php:8) in 
/var/www/html/prueba/index.php on line 10

What can be the problem here? How can I solution this?

Thanks in advance






_

Tutopia - Acceso a Internet rápido, fácil y a los mejores precios.
http://www.tutopia.com

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] Sessions Vs DB Access

2002-11-25 Thread Andrey Hristov
 Quick hack for those who think that the MM handler is not stable
is to use the standard handler and the directory where the session files
will be to be mounted as tmpfs (even /tmp). This will give almost of the
MM's speed
without worrying whether MM is stable or not.


Andrey

- Original Message -
From: "Mika Tuupola" <[EMAIL PROTECTED]>
To: "Peter Beckman" <[EMAIL PROTECTED]>
Cc: "Dave Smith" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Monday, November 25, 2002 11:30 AM
Subject: Re: [PHP-DB] Sessions Vs DB Access


> On Sun, 24 Nov 2002, Peter Beckman wrote:
>
> > Don't forget that you can use the DB to store PHP Sessions as well,
which
> > is faster than storing the sessions in /tmp on the file system.  If you
> > have well written SQL, you can have 5-30 queries per page, most of which
> > should return the data in under 1/100 of a second.
>
> Well it depends. On Solaris /tmp/ is tmpfs which is memory
> based filesystem so it will essentially have speed of a
> ram disk.
>
> --
> Mika Tuupola  http://www.appelsiini.net/~tuupola/
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] Sessions Vs DB Access

2002-11-25 Thread Mika Tuupola
On Sun, 24 Nov 2002, Peter Beckman wrote:

> Don't forget that you can use the DB to store PHP Sessions as well, which
> is faster than storing the sessions in /tmp on the file system.  If you
> have well written SQL, you can have 5-30 queries per page, most of which
> should return the data in under 1/100 of a second.

Well it depends. On Solaris /tmp/ is tmpfs which is memory
based filesystem so it will essentially have speed of a
ram disk.

-- 
Mika Tuupola  http://www.appelsiini.net/~tuupola/


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] Sessions Vs DB Access

2002-11-24 Thread Peter Beckman
Don't forget that you can use the DB to store PHP Sessions as well, which
is faster than storing the sessions in /tmp on the file system.  If you
have well written SQL, you can have 5-30 queries per page, most of which
should return the data in under 1/100 of a second.

I was running a site doing 150 queries per second, serving 1M page views a
day.  That's about 13M DB queries per day at a rate of about 11-12 page
views per second.  All on a dual 800mhz and 1gb of memory on FreeBSD,
Apache, PHP and MySQL.

It can be done!

Peter

On Sun, 24 Nov 2002, Dave Smith wrote:

> Chris,
>
> I'm assuming you're running this thing on *nix.
>
> Session variables are stored on the file system. PHP writes them out to
> /tmp, where it subsequently reads them upon request. The question is:
> How good at caching is your DB? If it can cache common select queries,
> then you are probably better using the DB (since file system caching is
> usually not that great). If your DB is busy with other things while the
> file system is relatively idle, maybe it'd be better to store them in
> sessions.
>
> The only real way to know is to benchmark both methods. You could come
> up with some real quick code that implements both methods. Then, run
> ApacheBench (ab) or JMeter to test the performance. Be sure that you run
> the benchmark utility in such a way to use the session vars (ie,
> simulate a user login). During the tests, watch things like load average
> (top) and I/O activity (iostat).
>
> Let us know which method works best for you. Scalability issues are so cool.
>
> --Dave
>
> Chris Payne wrote:
> > Hi there everyone,
> >
> > I have a system I am programming, and each page needs to get various config
> > elements from a DB, of course this means lots of DB access for each page.
> > What I was wondering is, after the user has logged in successfully it
> > currently stores their email, name, address and a few other bits of data in
> > a session, would it also be a good idea to store other information in a
> > session at the very start when they login to ease DB access?  Are there
> > problems with having lots of data in a session?  Well when I say lots of
> > data, I mean things like font size, color, table images, background colors,
> > some normal text etc  nothing like an essay or anything, just about
> > 30-50 different variables.
> >
> > Just want to make sure it won't slow my system down by doing this, or would
> > it speed it up because of less DB access?
> >
> > Thanks for your help
> >
> > Regards
> >
> > Chris
> >
> >
>
>
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

---
Peter Beckman  Internet Guy
[EMAIL PROTECTED] http://www.purplecow.com/
---

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] Sessions Vs DB Access

2002-11-24 Thread Dave Smith
Chris,

I'm assuming you're running this thing on *nix.

Session variables are stored on the file system. PHP writes them out to 
/tmp, where it subsequently reads them upon request. The question is: 
How good at caching is your DB? If it can cache common select queries, 
then you are probably better using the DB (since file system caching is 
usually not that great). If your DB is busy with other things while the 
file system is relatively idle, maybe it'd be better to store them in 
sessions.

The only real way to know is to benchmark both methods. You could come 
up with some real quick code that implements both methods. Then, run 
ApacheBench (ab) or JMeter to test the performance. Be sure that you run 
the benchmark utility in such a way to use the session vars (ie, 
simulate a user login). During the tests, watch things like load average 
(top) and I/O activity (iostat).

Let us know which method works best for you. Scalability issues are so cool.

--Dave

Chris Payne wrote:
Hi there everyone,

I have a system I am programming, and each page needs to get various config
elements from a DB, of course this means lots of DB access for each page.
What I was wondering is, after the user has logged in successfully it
currently stores their email, name, address and a few other bits of data in
a session, would it also be a good idea to store other information in a
session at the very start when they login to ease DB access?  Are there
problems with having lots of data in a session?  Well when I say lots of
data, I mean things like font size, color, table images, background colors,
some normal text etc  nothing like an essay or anything, just about
30-50 different variables.

Just want to make sure it won't slow my system down by doing this, or would
it speed it up because of less DB access?

Thanks for your help

Regards

Chris







--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] Sessions Vs DB Access

2002-11-24 Thread Chris Payne
Hi there everyone,

I have a system I am programming, and each page needs to get various config
elements from a DB, of course this means lots of DB access for each page.
What I was wondering is, after the user has logged in successfully it
currently stores their email, name, address and a few other bits of data in
a session, would it also be a good idea to store other information in a
session at the very start when they login to ease DB access?  Are there
problems with having lots of data in a session?  Well when I say lots of
data, I mean things like font size, color, table images, background colors,
some normal text etc  nothing like an essay or anything, just about
30-50 different variables.

Just want to make sure it won't slow my system down by doing this, or would
it speed it up because of less DB access?

Thanks for your help

Regards

Chris


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] SESSIONS

2002-11-01 Thread Peter Beckman
Do this instead:

$user = mysql_fetch_object($sql_result);

$_SESSION['user'] = $user;

Then, you can use stuff like:

print "{$_SESSION[user]->name}";
// or if register_globals is on
print "$user->name"; // which is nice because you don't have to {} the var or 
".$var[name]."

Peter

On Fri, 1 Nov 2002, wade wrote:

> How would one go about registering a session if you were to create
> the session based on the users ID and NAME from the database.
>
> I have the users ID and NAME already being pulled from the database
> and being stored in variables named $id and $name.
>
> I have latest version of PHP so I think I need to use the $_SESSION[]
> instead of session_register.
>
> I am also using the session_encode function to echo out the session that
> is currently being stored. What I am trying to store and what I am
> actually seeing printed to the page is entirly different.
>
> if (mysql_num_rows($sql_result) == 1)
> {
> session_start();
> list($id, $name) = mysql_fetch_row($sql_result);
> $SESSION_ID = $id;
> $SESSION_NAME = $name;
>
> session_register("SESSION_ID");
> session_register("SESSION_NAME");
> header("Location:");
> }
> else
> {
> header("Location:");
> exit;
> }
>
> --
> Should you have any questions, comments or concerns, feel free to call
> me at 318-338-2033.
>
> Thank you for your time,
>
> Wade Kelley, Design Engineer
> 
> Bayou Internet...(888) 30-BAYOU...http://www.bayou.com
> Mississippi Internet...(800) MISSISSIPPI...http://www.mississippi.net
> Vicksburg Online...(800) MISSISSIPPI...http://www.vicksburg.com
> 
>
>
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

---
Peter BeckmanSystems Engineer, Fairfax Cable Access Corporation
[EMAIL PROTECTED] http://www.purplecow.com/
---


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] SESSIONS

2002-11-01 Thread wade
How would one go about registering a session if you were to create
the session based on the users ID and NAME from the database.

I have the users ID and NAME already being pulled from the database
and being stored in variables named $id and $name.

I have latest version of PHP so I think I need to use the $_SESSION[]
instead of session_register.

I am also using the session_encode function to echo out the session that
is currently being stored. What I am trying to store and what I am
actually seeing printed to the page is entirly different.

if (mysql_num_rows($sql_result) == 1)
{
session_start();
list($id, $name) = mysql_fetch_row($sql_result);
$SESSION_ID = $id;
$SESSION_NAME = $name;

session_register("SESSION_ID");
session_register("SESSION_NAME");
header("Location:");
}
else
{
header("Location:");
exit;
}

--
Should you have any questions, comments or concerns, feel free to call
me at 318-338-2033.

Thank you for your time,

Wade Kelley, Design Engineer

Bayou Internet...(888) 30-BAYOU...http://www.bayou.com
Mississippi Internet...(800) MISSISSIPPI...http://www.mississippi.net
Vicksburg Online...(800) MISSISSIPPI...http://www.vicksburg.com





-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] sessions tutorial

2002-10-10 Thread Ruth Zhai

This is a very good tutorial about authentication using PHP and MySQL.  If
you don't use database, you may still learn some thing about sessions from
there:
http://phpcomplete.com/content.php?id=72

Ruth
- Original Message -
From: "Edward Peloke" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, October 11, 2002 3:54 AM
Subject: [PHP-DB] sessions tutorial


> Sorry, Michael, I meant to send this to the list, not just to you.  I
> apologize.
>
>
>
>
> Hello all,
>
> I am a php newbie and am currently developing my first php page.  My page
> will allow several people to log in at the same time sharing access to the
> mysql db.  SO, I need to use sessions.  Does anyone know of a good
tutorial
> on sessions to get me started?
>
> Thanks,
> Eddie
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] sessions tutorial

2002-10-10 Thread Edward Peloke

Sorry, Michael, I meant to send this to the list, not just to you.  I
apologize.




Hello all,

I am a php newbie and am currently developing my first php page.  My page
will allow several people to log in at the same time sharing access to the
mysql db.  SO, I need to use sessions.  Does anyone know of a good tutorial
on sessions to get me started?

Thanks,
Eddie


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] Sessions and their function

2002-09-12 Thread nikos

You sould register sessions first, and if have been registered, are passing
with session_start() in each page at the top, before the  tag..

If you want to pass variables from a page to another, put them in the url:
test.php?var=3&name=george (e.g.)

Be sure that the page you refer is dynamic (.php)

-

- Original Message -
From: "LOUD, Mark" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, September 12, 2002 12:02 PM
Subject: [PHP-DB] Sessions and their function


> Hi,
>
> I know this my sound stupid but here it goes..
>
> Can sessions be used to pass variables from one page to the next to create
> persistent data? I have this working to a certain extent but can only pass
a
> variable to my second page, but not from my second page onto the third.
Also
> in my second page I cannot change the value of this variable i.e. bob =
100
> on page 1, in page 2 I can display bob equalling 100 but then I want to a)
> alter the value of bob to 50 and b) send bob and its new value to third
> page. Can this be done by using sessions?
>
> Also how do you pass the session id of one page onto the next? do you pass
> it on the end of the page reference e.g.
>
> echo "";
>
> Any help would be grateful even if it was to tell me that I have got the
> wrong idea about sessions altogehter.
>
> Thanks
>
> Mark
>
>
>
> CONFIDENTIALITY NOTICE
> The information contained in this e-mail is intended only for the
> confidential use of the above named recipient. If you are not the intended
> recipient or person responsible for delivering it to the intended
recipient,
> you have received this communication in error and must not distribute or
> copy it.  Please accept the sender's apologies, notify the sender
> immediately by return e-mail and delete this communication.  Thank you.
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] Sessions and their function

2002-09-12 Thread LOUD, Mark

Hi,

I know this my sound stupid but here it goes..

Can sessions be used to pass variables from one page to the next to create
persistent data? I have this working to a certain extent but can only pass a
variable to my second page, but not from my second page onto the third. Also
in my second page I cannot change the value of this variable i.e. bob = 100
on page 1, in page 2 I can display bob equalling 100 but then I want to a)
alter the value of bob to 50 and b) send bob and its new value to third
page. Can this be done by using sessions?

Also how do you pass the session id of one page onto the next? do you pass
it on the end of the page reference e.g. 

echo "";

Any help would be grateful even if it was to tell me that I have got the
wrong idea about sessions altogehter.

Thanks

Mark



CONFIDENTIALITY NOTICE 
The information contained in this e-mail is intended only for the
confidential use of the above named recipient. If you are not the intended
recipient or person responsible for delivering it to the intended recipient,
you have received this communication in error and must not distribute or
copy it.  Please accept the sender's apologies, notify the sender
immediately by return e-mail and delete this communication.  Thank you. 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] sessions

2002-05-23 Thread Terry Romine

I just downloaded one yesterday from sourceforge
http://www.oscommerce.com/
It looks real solid, and easy to config via web interface.

On Thursday, May 23, 2002, at 09:56  AM, matt stewart wrote:

> i'd imagine there'll be a decent one on phpbuilder, or devshed, or
> webmonkey, or phpwizard
> if not, there's plenty of source code for existing shopping cart systems
> around these sites, so you can take them and rewrite it to your liking 
> and
> design!
> the wonders of open source!
>
Terry Romine
Web Developer
JumpInteractive.com



Re: [PHP-DB] sessions

2002-05-23 Thread César L . Aracena

There is a great-3-part-tutorial writen by Ying Zhang at DevShed.com.

You can find this tutorial at: 
http://www.devshed.com/Server_Side/PHP/Commerce/Commerce1

It's a tutorial which guides you through the creation of a e-commerce site with LOTS 
of things and capabilities. You should check it out in order to solve lots and lots of 
questions.

Cesar Aracena
[EMAIL PROTECTED]
Neuquen, Argentina


- Original Message - 
From: "James Kupernik" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, May 23, 2002 11:47 AM
Subject: Re: [PHP-DB] sessions


> Do you know where there is any good tutorials on creating a php shopping
> cart?
> 
> I enabled the auto.session_start .. then took out session_start .. that
> seemed to do the trick.
> 
> Any help on php shopping carts would be great!
> 
> Thanks
> 
> "Matt Stewart" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > sent the session_start(); before any output, that should do it...
> >
> > -Original Message-
> > From: James Kupernik [mailto:[EMAIL PROTECTED]]
> > Sent: 23 May 2002 15:38
> > To: [EMAIL PROTECTED]
> > Subject: [PHP-DB] sessions
> >
> >
> > I get this error when I try to start a session (I'm trying to create a
> > shopping cart).
> >
> > Warning: Cannot send session cache limiter - headers already sent
> >
> >
> > Thanks
> >
> >
> >
> > --
> > PHP Database Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
> 
> -- 
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 



Re: [PHP-DB] sessions

2002-05-23 Thread James Kupernik

OK .. so I guess I have to learn them huh?

Thanks for your help...

"Matt Stewart" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> if you don't want people to log in, then sessions are really the only
> sensible way of solving the basket solution.
>
> -Original Message-
> From: James Kupernik [mailto:[EMAIL PROTECTED]]
> Sent: 23 May 2002 16:15
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP-DB] sessions
>
>
> Thanks .. it is the wonders of open source.
>
> Are sessions required for a shopping basket? I don't want people to login,
> just order and go.
>
> "Matt Stewart" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > i'd imagine there'll be a decent one on phpbuilder, or devshed, or
> > webmonkey, or phpwizard
> > if not, there's plenty of source code for existing shopping cart systems
> > around these sites, so you can take them and rewrite it to your liking
and
> > design!
> > the wonders of open source!
> >
> > -Original Message-
> > From: James Kupernik [mailto:[EMAIL PROTECTED]]
> > Sent: 23 May 2002 15:48
> > To: [EMAIL PROTECTED]
> > Subject: Re: [PHP-DB] sessions
> >
> >
> > Do you know where there is any good tutorials on creating a php shopping
> > cart?
> >
> > I enabled the auto.session_start .. then took out session_start .. that
> > seemed to do the trick.
> >
> > Any help on php shopping carts would be great!
> >
> > Thanks
> >
> > "Matt Stewart" <[EMAIL PROTECTED]> wrote in message
> > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > > sent the session_start(); before any output, that should do it...
> > >
> > > -Original Message-
> > > From: James Kupernik [mailto:[EMAIL PROTECTED]]
> > > Sent: 23 May 2002 15:38
> > > To: [EMAIL PROTECTED]
> > > Subject: [PHP-DB] sessions
> > >
> > >
> > > I get this error when I try to start a session (I'm trying to create a
> > > shopping cart).
> > >
> > > Warning: Cannot send session cache limiter - headers already sent
> > >
> > >
> > > Thanks
> > >
> > >
> > >
> > > --
> > > PHP Database Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> >
> > --
> > PHP Database Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DB] sessions

2002-05-23 Thread matt stewart

if you don't want people to log in, then sessions are really the only
sensible way of solving the basket solution.

-Original Message-
From: James Kupernik [mailto:[EMAIL PROTECTED]]
Sent: 23 May 2002 16:15
To: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] sessions


Thanks .. it is the wonders of open source.

Are sessions required for a shopping basket? I don't want people to login,
just order and go.

"Matt Stewart" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> i'd imagine there'll be a decent one on phpbuilder, or devshed, or
> webmonkey, or phpwizard
> if not, there's plenty of source code for existing shopping cart systems
> around these sites, so you can take them and rewrite it to your liking and
> design!
> the wonders of open source!
>
> -Original Message-
> From: James Kupernik [mailto:[EMAIL PROTECTED]]
> Sent: 23 May 2002 15:48
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP-DB] sessions
>
>
> Do you know where there is any good tutorials on creating a php shopping
> cart?
>
> I enabled the auto.session_start .. then took out session_start .. that
> seemed to do the trick.
>
> Any help on php shopping carts would be great!
>
> Thanks
>
> "Matt Stewart" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > sent the session_start(); before any output, that should do it...
> >
> > -Original Message-
> > From: James Kupernik [mailto:[EMAIL PROTECTED]]
> > Sent: 23 May 2002 15:38
> > To: [EMAIL PROTECTED]
> > Subject: [PHP-DB] sessions
> >
> >
> > I get this error when I try to start a session (I'm trying to create a
> > shopping cart).
> >
> > Warning: Cannot send session cache limiter - headers already sent
> >
> >
> > Thanks
> >
> >
> >
> > --
> > PHP Database Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] sessions

2002-05-23 Thread James Kupernik

Thanks .. it is the wonders of open source.

Are sessions required for a shopping basket? I don't want people to login,
just order and go.

"Matt Stewart" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> i'd imagine there'll be a decent one on phpbuilder, or devshed, or
> webmonkey, or phpwizard
> if not, there's plenty of source code for existing shopping cart systems
> around these sites, so you can take them and rewrite it to your liking and
> design!
> the wonders of open source!
>
> -Original Message-
> From: James Kupernik [mailto:[EMAIL PROTECTED]]
> Sent: 23 May 2002 15:48
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP-DB] sessions
>
>
> Do you know where there is any good tutorials on creating a php shopping
> cart?
>
> I enabled the auto.session_start .. then took out session_start .. that
> seemed to do the trick.
>
> Any help on php shopping carts would be great!
>
> Thanks
>
> "Matt Stewart" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > sent the session_start(); before any output, that should do it...
> >
> > -Original Message-
> > From: James Kupernik [mailto:[EMAIL PROTECTED]]
> > Sent: 23 May 2002 15:38
> > To: [EMAIL PROTECTED]
> > Subject: [PHP-DB] sessions
> >
> >
> > I get this error when I try to start a session (I'm trying to create a
> > shopping cart).
> >
> > Warning: Cannot send session cache limiter - headers already sent
> >
> >
> > Thanks
> >
> >
> >
> > --
> > PHP Database Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DB] sessions

2002-05-23 Thread matt stewart

i'd imagine there'll be a decent one on phpbuilder, or devshed, or
webmonkey, or phpwizard
if not, there's plenty of source code for existing shopping cart systems
around these sites, so you can take them and rewrite it to your liking and
design!
the wonders of open source!

-Original Message-
From: James Kupernik [mailto:[EMAIL PROTECTED]]
Sent: 23 May 2002 15:48
To: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] sessions


Do you know where there is any good tutorials on creating a php shopping
cart?

I enabled the auto.session_start .. then took out session_start .. that
seemed to do the trick.

Any help on php shopping carts would be great!

Thanks

"Matt Stewart" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> sent the session_start(); before any output, that should do it...
>
> -Original Message-
> From: James Kupernik [mailto:[EMAIL PROTECTED]]
> Sent: 23 May 2002 15:38
> To: [EMAIL PROTECTED]
> Subject: [PHP-DB] sessions
>
>
> I get this error when I try to start a session (I'm trying to create a
> shopping cart).
>
> Warning: Cannot send session cache limiter - headers already sent
>
>
> Thanks
>
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] sessions

2002-05-23 Thread James Kupernik

Do you know where there is any good tutorials on creating a php shopping
cart?

I enabled the auto.session_start .. then took out session_start .. that
seemed to do the trick.

Any help on php shopping carts would be great!

Thanks

"Matt Stewart" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> sent the session_start(); before any output, that should do it...
>
> -Original Message-
> From: James Kupernik [mailto:[EMAIL PROTECTED]]
> Sent: 23 May 2002 15:38
> To: [EMAIL PROTECTED]
> Subject: [PHP-DB] sessions
>
>
> I get this error when I try to start a session (I'm trying to create a
> shopping cart).
>
> Warning: Cannot send session cache limiter - headers already sent
>
>
> Thanks
>
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DB] sessions

2002-05-23 Thread matt stewart

sent the session_start(); before any output, that should do it...

-Original Message-
From: James Kupernik [mailto:[EMAIL PROTECTED]]
Sent: 23 May 2002 15:38
To: [EMAIL PROTECTED]
Subject: [PHP-DB] sessions


I get this error when I try to start a session (I'm trying to create a
shopping cart).

Warning: Cannot send session cache limiter - headers already sent


Thanks



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] sessions

2002-05-23 Thread James Kupernik

I get this error when I try to start a session (I'm trying to create a
shopping cart).

Warning: Cannot send session cache limiter - headers already sent


Thanks



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] Sessions

2002-02-04 Thread Álvaro Muñoz Sánchez

Hi, all

First of all, I apologize if this is a dump question but I can't find the 
answer. I'm trying to use sessions to keep the information about user and 
password in a database driven web application. I am trying with a simple web 
page but I can't make it work correctly. Help me, please.

Environment: Red Hat Linux 7.2, Apache 1.3.20, PHP 4.0.6
Web pages:
Page 1: web page with a form asking for a user name and password.
Page 2: php page to validate the user name and pass and register them as 
session variables.
Page 3: php page to show the user name and pass introduced.

Code:

Page 2:





Page 3





Results:
Page 2: Opening the session
Warning: Cannot send session cookie - headers already sent by (output started 
at /var/www/html/sigma/agenda/index.php:13) in 
/var/www/html/sigma/agenda/index.php on line 27
 
Warning: Cannot send session cache limiter - headers already sent (output 
started at /var/www/html/sigma/agenda/index.php:13) in 
/var/www/html/sigma/agenda/index.php on line 27

Page 3: the same warnings and the value of the session variables is lost.

Here are my settings for sessions in the php.ini, It could be a configuration 
mistake.

session.save_handler = files
session.save_path = /tmp
session.use_cookies = 1
session.name = PHPSESSID
session.auto_start = 0
session.cookie_lifetime = 0
session.cookie_path = /
session.cookie_domain =
session.serialize_handler = php
session.gc_probability = 1
session.gc_maxlifetime = 1440
session.referer_check =
session.entropy_length = 0
session.entropy_file =
session.cache_limiter = nocache
session.cache_expire = 180
session.use_trans_sid = 1

I know that questions related to sessions had been treated in the list before 
but I can't find the answer to this, so I think this must be a very stupid 
question, sorry.


Thank you very much in advanced.
-- 
-
Álvar Muñoz Sánchez
Oficina Verde - UPV
Información y Documentación
-

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] Sessions and Frames

2001-10-18 Thread Raquel Rice

> > -Original Message-
> > From: TJayBelt <[EMAIL PROTECTED]>
> > To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
> > Date: Thursday, October 18, 2001 8:28 AM
> > Subject: [PHP-DB] Sessions and Frames
> >
> >
> > >I have a site that is successfully using sessions and
authentication.
> > >However, I am working on another site, and it uses Frames. 
> > The first site
> > >does not use frames, so including the unit that has the
> > session stuff first
> > >works.  But on the frames site, it gives the following error  :
> > >
> > >  'Cannot add header information - headers already sent by '
> > >
> > >I know that this is when something is trying to print before
> > the session is
> > >started.
> > >
> > >I just don't know how to accomplish this if the page I am
> > loading is inside
> > >a frame... so by the time the session stuff starts, html is
> > already output
> > >to the browser.
> > >
> > >thanks for any help you can give.

My only thought is, where are you trying to start your session in
the frames?  Are you trying to start the session in the "hidden"
frame or in one of the visible frames?  If the attempt is in a
visible frame then there has already been headers sent to start the
"hidden" frame.

-- 
Raquel

Finish each day and be done with it. You have done what you could;
some blunders and absurdities have crept in; forget them as soon as
you can. Tomorrow is a new day; you shall begin it serenely and with
too high a spirit to be encumbered with your old nonsense.
  --Ralph Waldo Emerson

  
  

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP-DB] Sessions and Frames

2001-10-18 Thread Premysl Dedic

I also suppose that something is printed before Header() function. 
Suppose, that you have code:



I such a case NO BLANK characters are allowed after closing "?>"  in included "xxx" 
file. Newline is enough to produce an error, you have received.



Premysl Dedic, 

Need, a.s. (Quest Group, a.s.)
Hybernská 20, Praha 1, +420 2 84000111

tel. +420 2 84000111
fax +420 2 84000101



--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP-DB] Sessions and Frames

2001-10-18 Thread Nally, Tyler G.

The manual says...

   Remember that the header() function must be called before any actual
output
   is sent, either by normal HTML tags blank lines in a file, or from PHP.
It is a
   very common error to read code with include(), or require(), functions,
or another
   file access function, and have spaces or empty lines that will output
before
   header() is called. The same problem exists when using a single PHP/HTML
file.

So, an example of what it's complaining about below leads me to
believe that you've already written some ouput to the browser which
effectively ends any possibility to do any HTTP HEADERS.

My guess is that something like this is happening


title of page


More HTML stuff here



... Whereas the following would be what  is acceptable ...




title of page

More HTML stuff here




--
__   _Tyler Nally
   / /__   _(_)___       _ _  [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]> 
  / / _ \/ __ `/ / __ \/ __ \ / __ \/ ___/ __ `/  317-860-3016
 / /  __/ /_/ / / /_/ / / / // /_/ / /  / /_/ /   American Legion Website
/_/\___/\__, /_/\/_/ /_(_)/_/   \__, /http://www.legion.org
<http://www.legion.org> 
   //  //   


 

 




> -Original Message-
> From: Dobromir Velev [ mailto:[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]> ]
> Sent: Thursday, October 18, 2001 3:50 AM
> To: TJayBelt; [EMAIL PROTECTED]
> Subject: Re: [PHP-DB] Sessions and Frames
>
>
> Hi,
> Every different page in a framset is loaded separatly so the
> only thing you
> should be aware of is not to output anything before the session stuff.
> Also you can use the output control functions lie ob_start -
> check the PHP
> manual for more info.
>
> HTH
> Dobromir Velev
>
> -Original Message-
> From: TJayBelt <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
> Date: Thursday, October 18, 2001 8:28 AM
> Subject: [PHP-DB] Sessions and Frames
>
>
> >I have a site that is successfully using sessions and authentication.
> >However, I am working on another site, and it uses Frames. 
> The first site
> >does not use frames, so including the unit that has the
> session stuff first
> >works.  But on the frames site, it gives the following error  :
> >
> >  'Cannot add header information - headers already sent by '
> >
> >I know that this is when something is trying to print before
> the session is
> >started.
> >
> >I just don't know how to accomplish this if the page I am
> loading is inside
> >a frame... so by the time the session stuff starts, html is
> already output
> >to the browser.
> >
> >thanks for any help you can give.
> >
> >
> >
> >--
> >PHP Database Mailing List ( http://www.php.net/ <http://www.php.net/> )
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >To contact the list administrators, e-mail:
> [EMAIL PROTECTED]
> >
> >
>
>
> --
> PHP Database Mailing List ( http://www.php.net/ <http://www.php.net/> )
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail:
> [EMAIL PROTECTED]
> 


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] Sessions and Frames

2001-10-18 Thread Dobromir Velev

Hi,
Every different page in a framset is loaded separatly so the only thing you
should be aware of is not to output anything before the session stuff.
Also you can use the output control functions lie ob_start - check the PHP
manual for more info.

HTH
Dobromir Velev

-Original Message-
From: TJayBelt <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Thursday, October 18, 2001 8:28 AM
Subject: [PHP-DB] Sessions and Frames


>I have a site that is successfully using sessions and authentication.
>However, I am working on another site, and it uses Frames.  The first site
>does not use frames, so including the unit that has the session stuff first
>works.  But on the frames site, it gives the following error  :
>
>  'Cannot add header information - headers already sent by '
>
>I know that this is when something is trying to print before the session is
>started.
>
>I just don't know how to accomplish this if the page I am loading is inside
>a frame... so by the time the session stuff starts, html is already output
>to the browser.
>
>thanks for any help you can give.
>
>
>
>--
>PHP Database Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] Sessions and Frames

2001-10-17 Thread TJayBelt

I have a site that is successfully using sessions and authentication.
However, I am working on another site, and it uses Frames.  The first site
does not use frames, so including the unit that has the session stuff first
works.  But on the frames site, it gives the following error  :

  'Cannot add header information - headers already sent by '

I know that this is when something is trying to print before the session is
started.

I just don't know how to accomplish this if the page I am loading is inside
a frame... so by the time the session stuff starts, html is already output
to the browser.

thanks for any help you can give.



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] sessions

2001-09-30 Thread nirat

how do u work with sessions in php IIS 5.



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP-DB] sessions in PHP

2001-09-24 Thread Dave Watkinson

http://www.php.net/session



-Original Message-
From: nirat [mailto:[EMAIL PROTECTED]]
Sent: 25 September 2001 06:46
To: [EMAIL PROTECTED]
Subject: [PHP-DB] sessions in PHP


can anyone guide me to using sessions in PHP i've tried it a lot of
times
but its not working. any help tutorials would be helpful...


--
Nirat




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] sessions in PHP

2001-09-24 Thread nirat

can anyone guide me to using sessions in PHP i've tried it a lot of times
but its not working. any help tutorials would be helpful...


--
Nirat




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP-DB] sessions and page refresh?

2001-05-06 Thread Beau Lebens

if you just want to refresh same page, then there shouldn't really be a
need, if you just do something like



or, if you mean refresh to another page, then you could use



the second one could also be used to send the location back to this page,
but make sure you do something conditional to keep the user out of an
endless loop :)

// -Original Message-
// From: DC [mailto:[EMAIL PROTECTED]]
// Sent: Monday, 7 May 2001 12:42 PM
// To: [EMAIL PROTECTED]
// Subject: [PHP-DB] sessions and page refresh?
//
//
// Hi All
//
// I have a call to session_destroy();
//
// This works
//
// But I also want to refresh the page as well.
//
// So onclick of button
//
// 1. session_destroy();
//
// 2 refresh page.
//
// Any help or ideas are welcome as always
//
// Thank you in advance
//
// Dave C
//
//
//
//
//
// --
// PHP Database Mailing List (http://www.php.net/)
// To unsubscribe, e-mail: [EMAIL PROTECTED]
// For additional commands, e-mail: [EMAIL PROTECTED]
// To contact the list administrators, e-mail: [EMAIL PROTECTED]
//


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] sessions and page refresh?

2001-05-06 Thread DC

Hi All

I have a call to session_destroy();

This works

But I also want to refresh the page as well.

So onclick of button

1. session_destroy();

2 refresh page.

Any help or ideas are welcome as always

Thank you in advance

Dave C





-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] Sessions ???

2001-05-02 Thread Joe Brown

Doh!
I meant there is "NO dire need"
""Joe Brown"" <[EMAIL PROTECTED]> wrote in message
9cp3kv$3hj$[EMAIL PROTECTED]">news:9cp3kv$3hj$[EMAIL PROTECTED]...
> For this operation there is dire need for session management.
>
> And remember the default variable order EGPCS may cause you trouble if
> you're sending a put variable across with the same name as a session
> variable.  Session vars take presidence in the global scope.
>
> http://localhost/forums/view.php?topicID=3
>
> The session var $topicID will override this put variable.
>
> $topicID=session var value //your 3 may not be here.
> $HTTP_GET_VARS["topicID"]=3 //you can still find your 3 here.
>
> Session variables are good for maintaining information from one page to
the
> next, avoiding the need for the client to keep sending the same
information
> over and over again.
>
> In either event, I recommend useing a different session variable name than
> the put variable's name, unless you use $HTTP_GET_VARS/$HTTP_SESSION_VARS
> accordingly.
>
> -Joe
>
> ""DC"" <[EMAIL PROTECTED]> wrote in message
> 9covu3$p6g$[EMAIL PROTECTED]">news:9covu3$p6g$[EMAIL PROTECTED]...
> > Hi All
> > I have a ? about setting a session.
> >
> > I have a functions.inc file and at the top have put my session statment
> that
> > looks like this.
> >
> >  > session_start();
> > session_register("$topidID");
> > ?>
> >
> > $topicID comes from my mysql db.
> >
> > What i am trying to do is set the $topicID of my message board so that
> when
> > a sucessful post has been made the visitor can click on a link that show
> the
> > right board by topicID.
> >
> > so the link will look like this...
> >
> > http://localhost/forums/view.php?topicID=3
> >
> > I am banging away trying to make this work
> >
> > Any help in the meantime is as always appreciated
> >
> > Thank You In Advance
> >
> > dave C
> >
> >
> >
> > --
> > PHP Database Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
>
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP-DB] Sessions ???

2001-05-02 Thread Steve Brett

when you build the string for the ahref just insert the value of $topidID

like so

echo 'link name here';

Steve

> -Original Message-
> From: DC [mailto:[EMAIL PROTECTED]]
> Sent: 02 May 2001 14:24
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP-DB] Sessions ???
> 
> 
> Thanks Steve;
> I now have this in a session file in my tmp dir
> 
> topicID|s:1:"8";
> 
> Now how do i get the link to read 
> http://localhost/forums/view.php?topicID=8
> 
> i think its along the lines of
> http://localhost/forums/view.php3?PHPSESSIONID?topicID
> 
> I am banging away, the 4 books i have on Php are useless when 
> it comes to
> session and there usage.
> 
> Thanks for the help
> 
> Dave C
> 
> "Steve Brett" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > try
> > session_register("topidID");
> >
> > without the $
> >
> > Steve
> >
> >
> > > -Original Message-
> > > From: DC [mailto:[EMAIL PROTECTED]]
> > > Sent: 02 May 2001 13:54
> > > To: [EMAIL PROTECTED]
> > > Subject: [PHP-DB] Sessions ???
> > >
> > >
> > > Hi All
> > > I have a ? about setting a session.
> > >
> > > I have a functions.inc file and at the top have put my
> > > session statment that
> > > looks like this.
> > >
> > >  > > session_start();
> > > session_register("$topidID");
> > > ?>
> > >
> > > $topicID comes from my mysql db.
> > >
> > > What i am trying to do is set the $topicID of my message
> > > board so that when
> > > a sucessful post has been made the visitor can click on a
> > > link that show the
> > > right board by topicID.
> > >
> > > so the link will look like this...
> > >
> > > http://localhost/forums/view.php?topicID=3
> > >
> > > I am banging away trying to make this work
> > >
> > > Any help in the meantime is as always appreciated
> > >
> > > Thank You In Advance
> > >
> > > dave C
> > >
> > >
> > >
> > > --
> > > PHP Database Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > To contact the list administrators, e-mail:
> > > [EMAIL PROTECTED]
> > >
> >
> > --
> > PHP Database Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: 
> [EMAIL PROTECTED]
> >
> 
> 
> 
> -- 
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: 
> [EMAIL PROTECTED]
> 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] Sessions ???

2001-05-02 Thread Joe Brown

For this operation there is dire need for session management.

And remember the default variable order EGPCS may cause you trouble if
you're sending a put variable across with the same name as a session
variable.  Session vars take presidence in the global scope.

http://localhost/forums/view.php?topicID=3

The session var $topicID will override this put variable.

$topicID=session var value //your 3 may not be here.
$HTTP_GET_VARS["topicID"]=3 //you can still find your 3 here.

Session variables are good for maintaining information from one page to the
next, avoiding the need for the client to keep sending the same information
over and over again.

In either event, I recommend useing a different session variable name than
the put variable's name, unless you use $HTTP_GET_VARS/$HTTP_SESSION_VARS
accordingly.

-Joe

""DC"" <[EMAIL PROTECTED]> wrote in message
9covu3$p6g$[EMAIL PROTECTED]">news:9covu3$p6g$[EMAIL PROTECTED]...
> Hi All
> I have a ? about setting a session.
>
> I have a functions.inc file and at the top have put my session statment
that
> looks like this.
>
>  session_start();
> session_register("$topidID");
> ?>
>
> $topicID comes from my mysql db.
>
> What i am trying to do is set the $topicID of my message board so that
when
> a sucessful post has been made the visitor can click on a link that show
the
> right board by topicID.
>
> so the link will look like this...
>
> http://localhost/forums/view.php?topicID=3
>
> I am banging away trying to make this work
>
> Any help in the meantime is as always appreciated
>
> Thank You In Advance
>
> dave C
>
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] Sessions ???

2001-05-02 Thread John Edward Molano








  Hola.
   
  Quiero saber que debo hacer para poder conectar a Informix a través 
  de php4. De antemano, gracias por la ayuda.
   
  John Molano
   
  ---Original Message---
   
  
  From: Angie Tollerson
  Date: Wednesday, May 
  02, 2001 08:26:28
  To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
  Subject: Re: [PHP-DB] 
  Sessions ???
   Dave,What you need to do is make sure that the 
  variable: $topidID is being set to a value first (before you register it 
  you must get it from the table. Once it is set you need to register it as 
  you did BUT WITHOUT the $. So it will 
  say:session_start();session_register("topidID");?>Make 
  sure that session_start is ALWAYS before any headers in your html page, 
  BUT register does NOT have to be. It can be declared anywhere in the page 
  as long as you have set the value in it already. Also, on every page that 
  will ever access topidID you must have session_start() at the top. But not 
  session_register, as the value has already been registered. HINT: if you 
  want to change the value of topidID just set it's value and then call a 
  register right after you do that. Hope this 
  helps!>>> "DC" 
  <[EMAIL PROTECTED]> 05/02/01 07:53AM 
  >>>Hi AllI have a ? about setting a session.I 
  have a functions.inc file and at the top have put my session statment 
  thatlooks like 
  this.session_start();session_register("$topidID");?>$topicID 
  comes from my mysql db.What i am trying to do is set the $topicID 
  of my message board so that whena sucessful post has been made the 
  visitor can click on a link that show theright board by 
  topicID.so the link will look like 
  this...http://localhost/forums/view.php?topicID=3 I am 
  banging away trying to make this workAny help in the meantime 
  is as always appreciatedThank You In Advancedave 
  C-- PHP Database Mailing List 
  (http://www.php.net/)To unsubscribe, e-mail: 
  [EMAIL PROTECTED] For additional commands, e-mail: 
  [EMAIL PROTECTED] To contact the list administrators, e-mail: 
  [EMAIL PROTECTED] --PHP Database Mailing 
  List (http://www.php.net/)To unsubscribe, e-mail: 
  [EMAIL PROTECTED]For additional commands, e-mail: 
  [EMAIL PROTECTED]To contact the list administrators, e-mail: 
  [EMAIL PROTECTED]







_IncrediMail - Email has finally 
evolved - Click 
Here

Re: [PHP-DB] Sessions ???

2001-05-02 Thread DC

Thanks Steve;
I now have this in a session file in my tmp dir

topicID|s:1:"8";

Now how do i get the link to read http://localhost/forums/view.php?topicID=8

i think its along the lines of
http://localhost/forums/view.php3?PHPSESSIONID?topicID

I am banging away, the 4 books i have on Php are useless when it comes to
session and there usage.

Thanks for the help

Dave C

"Steve Brett" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> try
> session_register("topidID");
>
> without the $
>
> Steve
>
>
> > -Original Message-
> > From: DC [mailto:[EMAIL PROTECTED]]
> > Sent: 02 May 2001 13:54
> > To: [EMAIL PROTECTED]
> > Subject: [PHP-DB] Sessions ???
> >
> >
> > Hi All
> > I have a ? about setting a session.
> >
> > I have a functions.inc file and at the top have put my
> > session statment that
> > looks like this.
> >
> >  > session_start();
> > session_register("$topidID");
> > ?>
> >
> > $topicID comes from my mysql db.
> >
> > What i am trying to do is set the $topicID of my message
> > board so that when
> > a sucessful post has been made the visitor can click on a
> > link that show the
> > right board by topicID.
> >
> > so the link will look like this...
> >
> > http://localhost/forums/view.php?topicID=3
> >
> > I am banging away trying to make this work
> >
> > Any help in the meantime is as always appreciated
> >
> > Thank You In Advance
> >
> > dave C
> >
> >
> >
> > --
> > PHP Database Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail:
> > [EMAIL PROTECTED]
> >
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] Sessions ???

2001-05-02 Thread Angie Tollerson

Dave,
What you need to do is make sure that the variable: $topidID is being set to a value 
first (before you register it you must get it from the table.  Once it is set you need 
to register it as you did BUT WITHOUT the $. So it will say:



Make sure that session_start is ALWAYS before any headers in your html page, BUT 
register does NOT have to be.  It can be declared anywhere in the page as long as you 
have set the value in it already.  Also, on every page that will ever access topidID 
you must have session_start() at the top.  But not session_register, as the value has 
already been registered. HINT: if you want to change the value of topidID just set 
it's value and then call a register right after you do that. 

Hope this helps!


>>> "DC" <[EMAIL PROTECTED]> 05/02/01 07:53AM >>>
Hi All
I have a ? about setting a session.

I have a functions.inc file and at the top have put my session statment that
looks like this.



$topicID comes from my mysql db.

What i am trying to do is set the $topicID of my message board so that when
a sucessful post has been made the visitor can click on a link that show the
right board by topicID.

so the link will look like this...

http://localhost/forums/view.php?topicID=3 

I am banging away trying to make this work

Any help in the meantime is as always appreciated

Thank You In Advance

dave C



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED] 
For additional commands, e-mail: [EMAIL PROTECTED] 
To contact the list administrators, e-mail: [EMAIL PROTECTED] 



--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP-DB] Sessions ???

2001-05-02 Thread Steve Brett

try
session_register("topidID");

without the $

Steve


> -Original Message-
> From: DC [mailto:[EMAIL PROTECTED]]
> Sent: 02 May 2001 13:54
> To: [EMAIL PROTECTED]
> Subject: [PHP-DB] Sessions ???
> 
> 
> Hi All
> I have a ? about setting a session.
> 
> I have a functions.inc file and at the top have put my 
> session statment that
> looks like this.
> 
>  session_start();
> session_register("$topidID");
> ?>
> 
> $topicID comes from my mysql db.
> 
> What i am trying to do is set the $topicID of my message 
> board so that when
> a sucessful post has been made the visitor can click on a 
> link that show the
> right board by topicID.
> 
> so the link will look like this...
> 
> http://localhost/forums/view.php?topicID=3
> 
> I am banging away trying to make this work
> 
> Any help in the meantime is as always appreciated
> 
> Thank You In Advance
> 
> dave C
> 
> 
> 
> -- 
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: 
> [EMAIL PROTECTED]
> 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] Sessions ???

2001-05-02 Thread DC

Hi All
I have a ? about setting a session.

I have a functions.inc file and at the top have put my session statment that
looks like this.



$topicID comes from my mysql db.

What i am trying to do is set the $topicID of my message board so that when
a sucessful post has been made the visitor can click on a link that show the
right board by topicID.

so the link will look like this...

http://localhost/forums/view.php?topicID=3

I am banging away trying to make this work

Any help in the meantime is as always appreciated

Thank You In Advance

dave C



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] Sessions w/ Communicator 4.7 Problem

2001-04-19 Thread Johannes Janson

Hi,

> $test = "The session data was transferred.";
> echo "Click this link: test2.php";

change this to test2.php";

you need to specify a variable name first behind the ?. It worked
for me on NS 4.75

Johannes

>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] Sessions w/ Communicator 4.7 Problem

2001-04-18 Thread Luke Muszkiewicz

Hey Folks:

I am finally using PHP sessions in IE 5.5 and NN 6 successfully, but I am
not able to retrieve the data from my registered variables in Communicator
4.7.

I created a simplified test app at the following URL:

http://puredev.com/session/test1.php

If you would be so kind, open this URL and click on the test2.php link and
you should see the following if the data was retrieved:

Test Results: The session data was transferred.

The code for these two test pages is as follows:

TEST1.PHP

test2.php";

?>

TEST2.PHP



What am I missing? Do I need to explicitly set the cookie for Communicator
4.7?

Thank you in advance!

-luke

Luke Muszkiewicz
Pure Development, LLC
http://puredev.com







-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] sessions and page has expired warning

2001-04-16 Thread Aleksey Yarilovets

Hi!
I had exactly the same problem and i found the script that does the job.
At the begining of your script write this:

if ( $rd == 1 )
{
   $tmp_str_store = "var_list_str";

   session_register ( "$tmp_str_store" );
   $$tmp_str_store = "";

   foreach ($HTTP_POST_VARS as $k => $v)


   if ( is_array ($$k) )
  foreach ( $$k as $ar_k=>$ar_v)
 $$tmp_str_store .= $k."[$ar_k]=".urlencode($ar_v)."&";
   else
  $$tmp_str_store .= $k . "=" . urlencode($v) . "&";
   }
   header ("Location: this_script_path?rd=2" );
   exit;
}
else
   if ( $rd == 2 )
  if ( isset($var_list_str) )
 parse_str($var_list_str);

in the HTML body write 

and vualya you will not get message like you describe NEVER!!!

By, Aleksey.

""olinux"" <[EMAIL PROTECTED]> wrote in message
000a01c0c0aa$2d465050$6401a8c0@amdk7">news:000a01c0c0aa$2d465050$6401a8c0@amdk7...
I am using sessions to store variables until all forms have been filled out.
at this point they are put into the db.
I would like to know how i can eliminate the problem that occurs when the
user presses the back button.  I receive a "warning, page has expired...
press refresh" I know that pressing refresh works fine, but some people do
not understand and get confused. How can i fix this?

thanks much
olinux




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] sessions and page has expired warning

2001-04-15 Thread Aleksey Yarilovets

Hi!

I had exactly the same problem with back/forward and i found the script that
does the job:




""olinux"" <> wrote in message
000a01c0c0aa$2d465050$6401a8c0@amdk7">news:000a01c0c0aa$2d465050$6401a8c0@amdk7...
I am using sessions to store variables until all forms have been filled out.
at this point they are put into the db.
I would like to know how i can eliminate the problem that occurs when the
user presses the back button.  I receive a "warning, page has expired...
press refresh" I know that pressing refresh works fine, but some people do
not understand and get confused. How can i fix this?

thanks much
olinux




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] sessions and page has expired warning

2001-04-12 Thread Phil Jackson

Here, I think you may be over - using session variables a bit...have not used them in 
php, as I have version 3, which doesn't support them.  However, by day I am an ASP 
developer, and article after article I read warns about session variables!  They are 
great, but can hog
memory, especially if you have many users concurrently, so I would use them sparingly, 
just when you have to.

The "back" button problem - here is where a session variable might be usefull, if you 
want to force a particular order of website traversal and not allow them to go back - 
when leaving, say page 1 - set a session variable $visitedPageOne = true
On the top of that page, first thing - check for the value of $visitedPageOne, if 
true, redirect to the next page, ect.

Phil J.


olinux wrote:

> I am using sessions to store variables until all forms have been filled out. at this 
>point they are put into the db.
> I would like to know how i can eliminate the problem that occurs when the user 
>presses the back button.  I receive a "warning, page has expired... press refresh" I 
>know that pressing refresh works fine, but some people do not understand and get 
>confused. How can i fix this?
>
> thanks much
> olinux


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] sessions and page has expired warning

2001-04-10 Thread Marc Bragg

Could you briefly outline how you store variables using sessions until the forms are 
completed? Or point to a tutorial? thanx.

olinux wrote:

> I am using sessions to store variables until all forms have been filled out. at this 
>point they are put into the db.
> I would like to know how i can eliminate the problem that occurs when the user 
>presses the back button.  I receive a "warning, page has expired... press refresh" I 
>know that pressing refresh works fine, but some people do not understand and get 
>confused. How can i fix this?
>
> thanks much
> olinux


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] sessions and page has expired warning

2001-04-08 Thread olinux

I am using sessions to store variables until all forms have been filled out. at this 
point they are put into the db.
I would like to know how i can eliminate the problem that occurs when the user presses 
the back button.  I receive a "warning, page has expired... press refresh" I know that 
pressing refresh works fine, but some people do not understand and get confused. How 
can i fix this? 

thanks much 
olinux



Re: [PHP-DB] Sessions and MySQL

2001-03-21 Thread Mark Robinson

Hello Rob,

Tuesday, 20 March 2001, you wrote:

RW> I am trying to implement session support with mysql. I am using
RW> session.set_save_handler but don't really have a great set of functions does
RW> anyone have some good ones?

Try http://www.phpbuilder.com/columns/ying2602.php3


 Mark



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] Sessions and MySQL

2001-03-20 Thread Rob Wheeldon

I am trying to implement session support with mysql. I am using
session.set_save_handler but don't really have a great set of functions does
anyone have some good ones?



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] Sessions in Functions

2001-03-16 Thread Jordan Elver

Hi,
I have some code which I decided to make into a function. Some of the code 
updates a session var which holds the current time. It now does not work.

// update session variable with new time
session_register("LOGGED_IN['time']");
$LOGGED_IN['time'] = mktime();

Are there issues that I should be aware of when I use sessions like this?

Thanks, 

Jord

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP-DB] Sessions in Functions

2001-03-16 Thread Allsebrook_Richard/askr
 BDY.RTF

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


[PHP-DB] sessions

2001-02-22 Thread Pankaj Ahuja

I am trying to execute the following code. It all works fine if the code is
executed second time onwards. When the code is executed for the first time
(a new session is created) the value of PHPSESSID is not assigned. Could
this be because session.auto_start is assigned a value of 0 ? What could be
a workaround for this ??

Thanks







Hello visitor, you have seen this page  times.

 is necessary to preserve the session id
# in the case that the user has disabled cookies
?>

To continue, click here



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] sessions vars problem ....

2001-02-06 Thread Steve Brett


hi,

i need to store the date as $day, $month, $year and then build it into some
selectors when a user returns to the page. so they chhose a date and it
stays constant as they move around the site. i have a department id that
does the same and i've duplicated the code for day, month, year etc and it
simply doesn't work.

it works when i refresh the page but not when i go to another page and then
back again.

this is the bit that sets the sessions vars whihc is on a page called
login2, which deals with the login stuff (strangely enough :-)

session_register("cday");
session_register("cmonth");
session_register("cyear");

then in the department calendar i have 

if (isset($cday))
{
$day = intval($cday);
}

if (isset($cmonth))
{
$month = intval($cmonth);

}

if (isset($cyear))
{
$year = intval($cyear);

}


// date option drop downs
if ( (!checkdate($month, $day, $year)) || (isset($today)) )
{
print "if !checkdate fired";
$nowArray = getdate();
$cday = $nowArray[mday];
$cmonth = $nowArray[mon];
$cyear = $nowArray[year];
unset($today);
}

$start = mktime (0, 0, 0, $cmonth, $cday, $cyear );

// date used in adding date lines
$start2 = mktime (0, 0, 0, $cmonth, $cday, $cyear );

$firstDayArray = getdate ($start);

echo '';
for ($x=1; $x<=31; $x++)
{
if (checkdate($cmonth, $x, $cyear)) // add if valid day number for
month
{
print "".$x;
}
}
print "";


echo '';
$months = Array("January", "February", "March", "April", "May", "June",
"July", "August", "September", "October", "November", "December");

for ($x=1; $x <= count($months); $x++)
{
print "\t".$months[$x-1]."\n";
}
echo '  ';

echo '';
for ($x=1998; $x<2004; $x++)
{
print "\t$x\n";
}
echo '  ';
echo '';

echo '';


--- sorry abouyt the log paste ...

ok. this is what happens.
when the user clicks today the date is set to todays. this works.
when they choose a day, month or year the form refreshes and shows the
correct calendar info. this works.

when they go to another page and then back again, the calendar defaults back
to todays date. i need the date to be the same as it was when they left the
page.

i've been staring at it for 2 hours now ...

tia,
Steve Brett 
Internal Development 
EMIS Ltd. 
"Privileged and /or Confidential information may be contained in this
message. If you are not the original addressee indicated in this message (or
responsible for delivery of the message to such person), you may not copy or
deliver this message to anyone. In such case, please delete this message,
and notify us immediately. Opinions, conclusions and other information
expressed in this message are not given or endorsed by my firm or employer
unless otherwise indicated by an authorised representative independently of
this message."
Egton Medical Information Systems Limited. Registered in England. No
2117205. 
Registered Office: Park House Mews, 77 Back Lane, Off Broadway, Horsforth,
Leeds, LS18 4RF



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]