Afficher un message
Vieux 14/06/2008, 18h56   #1
Twayne
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut very basic: session_start();

If there are better places for basic questions like this, feel free to
redirect me.

Say I have a php page with session_start(); I can assign variables and
those variables will carry over to other pages in order to use them in
those other pages, right? e.g. fname and thus $fname. Let's also
assume I am not assigning Global variables within any of the code.

But, if by chance one of those 'other' pages ALSO begins with a
session_start(); does that close the first session and throw away its
variables, making them no longer available from 'other' pages?
Is the above what the line $_SESSION['views']=n; is intended to
accomodate?
e.g.:

<?php
session_start();
// store session data
$_SESSION['views']=1;
?>
<html>
<body>

Does that then allow me, from any page, to call whichever set of
variables I want/need for that particular page by retrieving a 'views'
set?

I'm trying to work it our programatically but it's a little confusing
without some verification from the 'ones that know' if you will.

TIA

Twane


  Réponse avec citation
 
Page generated in 0,05578 seconds with 9 queries