Oracle Consulting Oracle Training Oracle Support Development
Home
Catalog
Oracle Books
SQL Server Books
IT Books
Job Interview Books
eBooks
Rampant Horse Books
911 Series
Pedagogue Books

Oracle Software
image
Write for Rampant
Publish with Rampant
Rampant News
Rampant Authors
Rampant Staff
 Phone
 800-766-1884
Oracle News
Oracle Forum
Oracle Tips
Articles by our Authors
Press Releases
SQL Server Books
image
image

Oracle 11g Books

Oracle tuning

Oracle training

Oracle support

Remote Oracle

STATSPACK Viewer

Privacy Policy

 

   
 

ss

Oracle Tips by Burleson 

session_registery

(PHP 4 , PHP 5)

session_register -- Registers one or more global variables with the current session.

Description

bool session_register( mixed name [, mixed ...])

session_register() accepts a variable number of arguments, any of which can be either a string holding the name of a variable or an array consisting of variable names or other arrays. For each name, session_register() registers the global variable with that name in the current session.

M Warning: For a script to work regardless of register_globals, use the $_SESSION array as $_SESSION entries are automatically registered. If a script uses session_register(), it will not work in environments where the PHP directive register_globals are disabled.

Since PHP 4.2.0, the default value for the PHP directive register_globals is off. The PHP community encourages users not to rely on this directive but instead use other means, such as the superglobals.

M    Warning: This registers a global variable. To register a session variable from within a function, make it global using the global keyword or the $GLOBALS[] array, or use the special session arrays as noted below. If using $_SESSION (or $HTTP_SESSION_VARS), do not use session_register(), session_is_registered(), and session_unregister()

This function returns TRUE when all of the variables are successfully registered with the session.

If session_start() was not called before this function is called, an implicit call to session_start() with no parameters will be made. $_SESSION does not mimic this behavior and requires session_start() before use.

Also create a session variable by simply setting the appropriate member of the $_SESSION or $HTTP_SESSION_VARS (PHP < 4.1.0) array.

Register_globals is a deprecated configuration directive which was used to automatically register any global variable with the started session. It was very convenient and very insecure. Users would open two unrelated scripts from the same browser session, and inadvertently share data and set incorrect starting values.

PHP 5, the latest version, is shipped with register_globals set to OFF. The best option is to leave it that way and use the $_SESSION array in the same way shown in the example7b. Can it get any better than this; should there be a character to use $_SESSION array?  It turns out that there is a function called “extract” that makes life more livable. Here is what the manual says:

See code depot for complete scripts


The above book excerpt is from:

Easy Oracle PHP

Create Dynamic Web Pages with Oracle Data

ISBN 0-9761573-0-6   

Mladen Gogala

http://www.rampant-books.com/book_2005_2_php_oracle.htm

 

Download your Oracle scripts now:

www.oracle-script.com

The definitive Oracle Script collection for every Oracle professional DBA

Linux Oracle commands syntax poster

ION Oracle tuning software

Oracle data dictionary reference poster



Oracle Forum

BC Oracle consulting support training

BC remote Oracle DBA   

 

   

 Copyright © 1996 -2017 by Burleson. All rights reserved.


Oracle® is the registered trademark of Oracle Corporation. SQL Server® is the registered trademark of Microsoft Corporation. 
Many of the designations used by computer vendors to distinguish their products are claimed as Trademarks
 

Hit Counter