QUERY_STRING in Table link

QuestionsQUERY_STRING in Table link
Mario asked 8 years ago

I want to use the whole querystring, instead of using separate parameters:

// works:
$col["link"] = "file.php?list1_table_id={table_id}&list1_id={id}&add=1&code=".$_GET["code"];

//works not
$col["link"] = "file.php?list1_table_id={table_id}&'.$_SERVER['QUERY_STRING'].';

//works not
$col["link"] = "file.php?list1_table_id={table_id}&$_SERVER['QUERY_STRING'];

Idea?
Thanx!

5 Answers
selectcase.biz answered 8 years ago

I want to use the whole querystring, instead of using separate parameters:

// works:
$col["link"] = "file.php?list1_table_id={table_id}&list1_id={id}&add=1&code=".$_GET["code"];

//works not
$col["link"] = "file.php?list1_table_id={table_id}&'.$_SERVER['QUERY_STRING'].';

//works not
$col["link"] = "file.php?list1_table_id={table_id}&$_SERVER['QUERY_STRING'];

Idea?
Thanx!

Abu Ghufran answered 8 years ago

Perhaps, only ". is missing in #3. Rest looks fine.

$col["link"] = "file.php?list1_table_id={table_id}&".$_SERVER['QUERY_STRING'];

selectcase.biz answered 8 years ago

Thanx

yes this was the case. Now the querystring works and shows all variables. However it also shows internal variables from phpgrid, for instance:

file.php?list1_table_id=table_id&&list1_id=626&grid_id=list1&_search=false&nd=1481737502616&rows=20&jqgrid_page=1&sidx=id&sord=desc

I tried to unset the unwanted variables with:

file.php?list1_id=0&grid_id=0&_search=0&nd=0&rows=0&jqgrid_page=0&sidx=0&sord=0

But they are still evoked. Is it possible to unset the unwanted variables in this link, since then I could use the above query_string-method for my own variables.

I think, I should know the name of the correct phpgridvariables and set them after the querystring, then they are there but not used.

I know that the following ewritingmethod overwrites unwanted variables, but I need to no the correct values…

file.php?list1_table_id={table_id}&".$_SERVER['QUERY_STRING']&&grid_id=0&_search=0&nd=0&rows=0&jqgrid_page=0&sidx=0&sord=0;

Thanx!

Abu Ghufran answered 8 years ago

You can remove unwanted variables from querystring url by php code.
https://davidwalsh.name/php-remove-variable

Your Answer

17 + 10 =

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 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

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

Let us improve this post!

Tell us how we can improve this post?