is the posted values global ? ($http->hasPostVariable poblem)

Author Message

Selmah Maxim

Thursday 22 May 2003 5:37:12 am

hello ..

now am working on workflow, will check if user had submit his data befor or not (not user data), i was trying to catch the posted value from hidden input in form :

$http->hasPostVariable('CheckSubmition');

i got always false from my workflow file, but i went to content/action.php and added this line to store the value in the session vars :

if($http->hasPostVariable( 'CheckSubmition') ) $http->setSessionVariable( "CheckSubmition", "CheckSubmition" );

now, from my workflow file am useing this to check the value :

if ( $http->hasSessionVariable( 'CheckSubmition') )

if it`s true will call template file with msg that he have submit befor, work nice, but the value is still stored in session vars, so he cann`t browes the site, he will always get this msg !
so, i thought better if remove this value from the session after call the msg template, now is working also well, but if user click refesh will access the page :(

how can i slove this, $http->hasPostVariable is not working from workflow !

the workflow setting is , content,read, befor.

any help plz !

Bård Farstad

Wednesday 28 May 2003 1:58:21 am

Using the eZHTTPTool class and the postVariable function you will be able to fetch any HTTP POST variable in your script.

In a shopping workflow I use:
$http =& eZHTTPTool::instance();
if ( $http->hasPostVariable( "Name" ) )
$tmpName = $http->postVariable( "Name" );

This works on a normal form variable called Name.

--bård

Documentation: http://ez.no/doc

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.