Fiji Web Design
Welcome, Guest
Please Login or Register.    Lost Password?
Re:How to pass parameters.. ??? (1 viewing) (1) Guest
Go to bottom Post Reply Favoured: 0
TOPIC: Re:How to pass parameters.. ???
#154
FJA (User)
Fresh Boarder
Posts: 3
graphgraph
User Offline Click here to see the profile of this user
How to pass parameters.. ??? 3 Years, 5 Months ago Karma: 0  
Hi,

I've just installed Your component and module - and they are very easy to start using - really nice work

I have some php-pages gerated using http://www.bigprof.com/appgini/ php code generator, which creates applications based on sql - for instance a DVD database - book catalogue and such. Doing some minor adhustments I succeded in launching the app - and activate some simple security to prevent direct access to applications.

I have one major problem.. The generated application includes lists of data with navigation (page back - forward, go-to and so on) as well as search and sorting options. The layout is based on FORMS, and basically the same form is called, and when generated agin, HTTP_POST_VARS are used for dataselection.

Can I somehow access those in the module?? Using some of Your tips, I've managed to get the pages reloaded (using components joomlalink), but content is the same - i.e. - parametrs are not recognized.
As You can see I'm absolutely no php expert, so this might be caused by all sorts of basic misunderstanding - but I would very much like a 'hint' if You can help..

Parameter retrieval is part of a include ph module like this:

function Render()
{
// get post and get variables
global $HTTP_SERVER_VARS, $HTTP_GET_VARS, $HTTP_POST_VARS, $_SERVER, $Translation;

if($HTTP_SERVER_VARS["REQUEST_METHOD"] == "GET"
{
$SortField = $HTTP_GET_VARS["SortField"];
$SortDirection = $HTTP_GET_VARS["SortDirection"];
$FirstRecord = $HTTP_GET_VARS["FirstRecord"];
$ScrollUp_y = $HTTP_GET_VARS["ScrollUp_y"];
$ScrollDn_y = $HTTP_GET_VARS["ScrollDn_y"];
$Previous_x = $HTTP_GET_VARS["Previous_x"];
$Next_x = $HTTP_GET_VARS["Next_x"];

$Search_x = $HTTP_GET_VARS["Search_x"];
$SearchString = $HTTP_GET_VARS["SearchString"];


$Print_x = $HTTP_GET_VARS["Print_x"];
$SelectedID = $HTTP_GET_VARS["SelectedID"];
$insert_x = $HTTP_GET_VARS["insert_x"];
$update_x = $HTTP_GET_VARS["update_x"];
$delete_x = $HTTP_GET_VARS["delete_x"];
$deselect_x = $HTTP_GET_VARS["deselect_x"];
}
else
{
$SortField = $HTTP_POST_VARS["SortField"];
$SortDirection = $HTTP_POST_VARS["SortDirection"];
$FirstRecord = $HTTP_POST_VARS["FirstRecord"];
$ScrollUp_y = $HTTP_POST_VARS["ScrollUp_y"];
$ScrollDn_y = $HTTP_POST_VARS["ScrollDn_y"];
$Previous_x = $HTTP_POST_VARS["Previous_x"];
$Next_x = $HTTP_POST_VARS["Next_x"];
$Search_x = $HTTP_POST_VARS["Search_x"];
$SearchString = $HTTP_POST_VARS["SearchString"];

$Print_x = $HTTP_POST_VARS["Print_x"];
$SelectedID = $HTTP_POST_VARS["SelectedID"];

}

I hope You are able to help!

Thx
Frank
 
Report to moderator   Logged Logged  
 
Last Edit: 2008/09/04 15:07 By FJA.
  The administrator has disabled public write access.
#157
FJA (User)
Fresh Boarder
Posts: 3
graphgraph
User Offline Click here to see the profile of this user
Re:How to pass parameters.. ??? 3 Years, 5 Months ago Karma: 0  
OK, I found managed to find help on google. There is a Joomla fuction: JRequest::getVar( 'option', '' ); that does the trick!!

Check here for help
 
Report to moderator   Logged Logged  
 
Last Edit: 2008/09/06 15:35 By FJA.
  The administrator has disabled public write access.
#161
admin (Admin)
Admin
Posts: 475
graph
User Online Now Click here to see the profile of this user
Re:How to pass parameters.. ??? 3 Years, 5 Months ago Karma: 10  
Good find.

Yes, Joomla 1.5, you need to use

JRequest::getVar( 'option', '' );
If you're on J1.0 you can use
mosGetParam($_REQUEST, 'option');
Both functions will strip HTML and quote the variable for you to make it more secure you use in XSS and SQL.
 
Report to moderator   Logged Logged  
 
Last Edit: 2008/09/18 13:29 By admin.
  The administrator has disabled public write access.
#594
verma (User)
Fresh Boarder
Posts: 6
graphgraph
User Offline Click here to see the profile of this user
Re:How to pass parameters.. ??? 3 Years ago Karma: 0  
I ll try to sort out your problem but i in few hours because i think its a complicated error..so dear i ll catch you later..
 
Report to moderator   Logged Logged  
 
  The administrator has disabled public write access.
#671
verma (User)
Fresh Boarder
Posts: 6
graphgraph
User Offline Click here to see the profile of this user
Re:How to pass parameters.. ??? 2 Years, 12 Months ago Karma: 0  
extract($_POST);

then you dont have to use

<?= $_POST['mychoice']?>

you can just use

<?= $mychoice?>
 
Report to moderator   Logged Logged  
 
  The administrator has disabled public write access.
Go to top Post Reply
Powered by FireBoardget the latest posts directly to your desktop

Joomla Downloads

DownloadsDownload our free Joomla! Components, Modules and Plugins.