473,395 Members | 2,443 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

session_start and session_register

Hi All,

is that OK if I declare the same variable in the same file several
times? For example somewhere in the beginning of a file I have
session_register("cat") and than, somewhere in the middle of the file,
I have again session_register("cat"). Can the second declaration
destroy the value of the variable cat?

Is that OK if I start_session several times in the same file? Will the
second "start_session" open a new session?
Jan 12 '08 #1
1 2322
On Jan 11, 5:53 pm, Kurda Yon <kurda...@yahoo.comwrote:
Hi All,

is that OK if I declare the same variable in the same file several
times? For example somewhere in the beginning of a file I have
session_register("cat") and than, somewhere in the middle of the file,
I have again session_register("cat"). Can the second declaration
destroy the value of the variable cat?

Is that OK if I start_session several times in the same file? Will the
second "start_session" open a new session?
i think its depend, if the $cat value doesnt change, it will not the
value $_SESSION['cat'] will be the same,
but if $cat value change before the declaration of
session_register($cat), of course $_SESSION['cat'] will change.

-------------------------------------------------------------------------
and will also depend on how you code it.
Jan 12 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: mr_burns | last post by:
Hi, i am getting the following errors when running my php script: Warning: Cannot send session cookie - headers already sent by (output started at ...
2
by: Philip D Heady | last post by:
is this valid? session_register('variable1','variable2','variable3','etc'); If not, how can you register a bunch all at once without having to use a line for each variable?
19
by: Chris Allen | last post by:
Hi I'm new to PHP and I'm trying to create a Login Form. Once the user has logged in then he shouldn't have to log in again. The trouble is I'm getting a new session ID between every page and so...
8
by: lkrubner | last post by:
I was trying to set a cookie before I called session_start() and it was giving me an error. But isn't sessions really just a cookie? Why would it matter if I sent a cookie before session_start? Can...
5
by: Niklas Uhlin | last post by:
Someone please explain why Session_Start fires multiple times / retains SessionID values between sessions, when you open an ASP.NET page from MS Word. For details of the problem, see below: 1....
19
by: lawrence k | last post by:
How can I find out where my script is outputting to the screen for the first time? My error logs are full of stuff like this: PHP Warning: session_start(): Cannot send session cache...
14
The1corrupted
by: The1corrupted | last post by:
Alright, I seriously do NOT understand sessions what so ever. Whenever I try to transfer data from page to page, the session_start(); is always killed because of some sort of cookie/cache limiter. ...
4
by: three-eight-hotel | last post by:
I'm somewhat of a newbie to PHP coding, but have developed a site using the technology, and have been pleasantly surprised by the capabilities offered. I am more comfortable in the ASP world,...
6
anfetienne
by: anfetienne | last post by:
hi ive been using a login code which uses sql & db its quite simple and has been working great.....but as i have just gone to do a final test on the site i've built starting from the login page i get...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.