PHP variables don't get sent to pages? PDF Print E-mail
Written by Administrator   
Thursday, 20 September 2007

DHOST doesn't support global variables, thus you must include POST (aka HTTP_POST_VARS) or GET (aka HTTP_GET_VARS) on variables that are passed to other scripts.

$_POST['variable'] - Variables that are directly sent to same/other script.
$_GET['variable'] - Variables passed over the URL. (i.e. script.php?action=go)

If you don't want to have the hassle of adding POST or GET to all of your variables...add this to the very top of your php script:

extract($_POST);
extract($_GET);

That code turns $_POST['variable'] and $_GET['variable'] into $variable. But please note: It's not a very good idea to do this (unsafe).

 

 

Comments
Add New Search
Write comment
Name:
Email:
 
Title:
UBBCode:
[b] [i] [u] [url] [quote] [code] [img] 
 
:D:):(:0:shock::confused:8):lol::x:P
:oops::cry::evil::twisted::roll::wink::!::?::idea::arrow:
 
 

3.26 Copyright (C) 2008 Compojoom.com / Copyright (C) 2007 Alain Georgette / Copyright (C) 2006 Frantisek Hliva. All rights reserved."

Last Updated ( Thursday, 20 September 2007 )
 
< Prev   Next >