To send ID as session variable

QuestionsTo send ID as session variable
C3media asked 5 years ago

Hi,

I'm trying to link ID from grid as $_session Variable to other page on click or Submit button…
┬┐someboy know the method to make it?

Thanks!

3 Answers
Abu Ghufran answered 5 years ago

You can set link formatter to any column, and pass the ID or similar field to other url using {field} placeholder in url.
Refer demos/appearance/external-link.php

$col = array();
$col["title"] = "Client";
$col["name"] = "name";
$col["width"] = "100";
$col["search"] = true;
$col["editable"] = true;
$col["export"] = false; // this column will not be exported

// link e.g. http://domain.com?id={id} given that, there is a column with $col["name"] = "id" exist
$col["link"] = "http://google.com/?id={id}";
$col["linkoptions"] = "target='_blank'"; // extra params with <a> tag

$cols[] = $col;

C3media answered 5 years ago

Ok, Would have to work; But what about security to ensure clicking from form and not external?

session vars maybe better…

Thanks!

Abu Ghufran answered 5 years ago

You can use $_SERVER["HTTP_REFERER"] condition on target page to ensure it's clicked from grid.

Your Answer

16 + 3 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating / 5. Vote count:

We are sorry that this post was not useful for you!

Let us improve this post!