[PHP] Global Vars

2004-03-04 Thread Patrick Fowler
I installed SuSE Linux 9.0 along with php. The flag below is turned off by default. I could not send any vars with a post or get form. I turned it one and all works well. The comments tell you not to turn it on because of possible security issues and to code around it. My question is how do

Re: [PHP] Global Vars

2004-03-04 Thread Adrian
use $_POST['name_of_your_form_field'] or $_GET['name_of_your_form_field'] or $_REQUEST['name_of_your_form_field'] $_REQUEST contains $_GET, $_POST and $_COOKIE for server vars there is $_SERVER and $_ENV for environment vars $_SESSION is for session vars -- PHP General Mailing List

RE: [PHP] Global Vars

2004-03-04 Thread Jay Blanchard
[snip]My question is how do you send vars and session var from page to page without it turned on? Any info would be a big help. [/snip] rtfm, rtfa, stfw use $_POST or $_GET array http://www.php.net/variable -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] Global Vars

2004-03-04 Thread Ryan A
$_GET['variable_name'] for GET variables and $_POST['variable_name'] for POST variables. Change the variable_name to whatever was in your form, for example the below variable name is cust_name input type=text name=cust_name For session it would be $_SESSION['session_name'] etc etc The above

[PHP] Global vars or Environment var on Class

2004-02-17 Thread Turbo
Hi I cann't call Global vars or Environment var on Class.How to's i do to call it? I want to call variable same below. var $location =http://.$HTTP_SERVER_VARS['HTTP_HOST'].$_SERVER['REQUEST_URI'].?.$HTTP_SERVER_VARS['QUERY_STRING']; Thank you. Turbo. -- PHP General Mailing List

[PHP] Global VARS.

2003-03-07 Thread Vincent M.
Hello, To get ride of magic_quotes I do: function no_magicquotes() { global $HTTP_GET_VARS ; global $HTTP_POST_VARS ; global $HTTP_COOKIE_VARS ; if (get_magic_quotes_gpc()) { // Overrides GPC variables for (reset($HTTP_GET_VARS); list($k, $v) = each($HTTP_GET_VARS); ) $$k =

[PHP] Global Vars = Off Windows/Linux Differeces???

2003-02-10 Thread Sascha Braun
Hi, I've made a website and because of presentationproblems I changed the oldstyle vars to the new globalvars mode (Hope its the right name for it, dont know if $_SESSION['user'] is a global or it is not???). Now the Website works perfect on my WAMP System with Apache 1.3.27 and PHP 4.3.0, but

Re: [PHP] Global Vars = Off Windows/Linux Differeces???

2003-02-10 Thread Leif K-Brooks
Pretty hard to tell anything without any details about what you're doing... Sascha Braun wrote: Hi, I've made a website and because of presentationproblems I changed the oldstyle vars to the new globalvars mode (Hope its the right name for it, dont know if $_SESSION['user'] is a global or it

[PHP] Global Vars

2002-09-18 Thread Sascha Braun
Hi Everone, for my newest projekt i started to use global var like $_REQUEST['varname'] and so on. But in some cases i started again to use old var mode. Finally i have read some about there is need to define the vars, before I'm going to create the source for my webpages. But how can i make

[PHP] Global vars

2002-06-02 Thread Anzak Wolf
I have a question about global vars. Why is it that I have to declare a var global if I'm using it across included files. For example the only why I can get this var to work is by making it global. main.php ?php include loader.inc; include builder.inc; include render.inc; ? loader.inc ?php

Re: [PHP] Global vars

2002-06-02 Thread Philip Olson
global $var; does nothing outside of a function. You do not need to use global for this. $foo = 'bar'; include 'something_that_uses_foo.inc'; http://www.php.net/manual/en/language.variables.scope.php regards, Philip Olson On Sun, 2 Jun 2002, Anzak Wolf wrote: I have a question about

[PHP] global vars within 2-level functions

2002-04-02 Thread Erik Price
I have some code, in which I am using the function keyword to create subroutines of code (in otherwords, not true functions but rather reuseable chunks of other code). Yeah, it's ugly, but I need to do it this way for now. So my question is this: One of my subroutine/functions generates a

Re: [PHP] global vars within 2-level functions

2002-04-02 Thread Jason Wong
On Wednesday 03 April 2002 02:11, Erik Price wrote: (b) Pass a variable as an argument to a function but make that argument optional so that it does not have to exist to make the function legitimate. function function2 ($variable_A=) { } It's in manual under Functions -- original isn't it?

Re: [PHP] global vars within 2-level functions

2002-04-02 Thread Erik Price
On Tuesday, April 2, 2002, at 01:24 PM, Jason Wong wrote: (b) Pass a variable as an argument to a function but make that argument optional so that it does not have to exist to make the function legitimate. function function2 ($variable_A=) { } Thanks for the pointer. I didn't realize

Re: [PHP] global vars within 2-level functions

2002-04-02 Thread Miguel Cruz
On Tue, 2 Apr 2002, Erik Price wrote: On Tuesday, April 2, 2002, at 01:24 PM, Jason Wong wrote: (b) Pass a variable as an argument to a function but make that argument optional so that it does not have to exist to make the function legitimate. function function2 ($variable_A=) { }

[PHP] global vars in a function

2002-03-29 Thread Justin French
Hi, Am I missing something? I'm trying to use vars set in my config.php file in a function, and can't seem to do it without using $GLOBALS[varname], which is a bit of a pain in the ---config.php--- $var1 = 1; --- ---something.php--- function foo { if($var1) { echo