Jump to content

How to get POST variables?


Bazilisk

Recommended Posts

Posted
require_once( "path_to_ipb" . 'init.php' );
$request = \IPS\Request::i()->var;
print ($request);

How to get POST variables? Can not find it in docs. This method don't work :(

Posted
header('Content-type: text/html; charset=UTF-8');
include(dirname($_SERVER['DOCUMENT_ROOT']) . DIRECTORY_SEPARATOR . 'configlin.php');
error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE);
include($path_www2 . 'forum/sphinxapi.php');
define( 'IPB_THIS_SCRIPT', 'public' );
define( 'IPS_ENFORCE_ACCESS', TRUE ); // Приложение работает при отключенном форуме
require_once( $path_to_ipb . 'init.php' );
//require_once( IPS_ROOT_PATH . 'sources/base/ipsRegistry.php' );
//require_once( IPS_ROOT_PATH . 'sources/base/ipsController.php' );
//$ipbRegistry	= ipsRegistry::instance();
//$ipbRegistry->init();
//$memberData = &$ipbRegistry->member()->fetchMemberData();
$search_term = "";
$page = 1;
$text_out = "";
//$request	=& $ipbRegistry->fetchRequest();
$request = \IPS\Request::i()->var;
print "<pre>";
print_r ($request); 
......

Its changed code from 3.4 version, but don't work.

 

Posted
require_once( "path_to_ipb" . 'init.php' );
$request = \IPS\Request::i()->var;
print ($request);

How to get POST variables? Can not find it in docs. This method don't work :(

Change  

\IPS\Request::i()->var

to

\IPS\Request::i()

Posted
require_once( "path_to_ipb" . 'init.php' );
$request = \IPS\Request::i()->var;
print ($request);

How to get POST variables? Can not find it in docs. This method don't work :(

​Can you describe what isn't working? POST is merged into the data that object works with after REQUEST, so if you have a POST id=2 and a REQUEST id=3(should never happen obviously, merely an example), \IPS\Request::i()->id would return 2.

 

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...