Page 3 of 3

Re: Passing $_GET variables.

PostPosted: Tue Jun 12, 2012 11:03 pm
by hexxamillion
This is interesting. I can get the list of my tables to show but can you help me understand the purpose of this code? When I select one of my tables the URL updates but the screen is just blank with the list of tables menu.

Re: Passing $_GET variables.

PostPosted: Fri Jun 22, 2012 12:12 pm
by KarelB
There is one assumption in the example and that is that there is an (auto increment) column 'id" that serves as the $primaryCol.

Re: Passing $_GET variables.

PostPosted: Thu Jan 17, 2013 3:02 pm
by AlexNu
I'm having some trouble with this in the free version.

Inside, display_html, the line you say to look for isn't there. The closest there is is this:
Code: Select all
var ajaxUrl = '<?php echo $_SERVER['PHP_SELF']; ?>;


Replacing that (or leaving it and adding) with the line given here in this thread,
Code: Select all
setAjaxInfo({url: "'.$_SERVER["PHP_SELF"].'?tbl='.$_GET["tbl"].'", history: true});


Doesn't seem to change anything. Also, my syntax highlighting doesn't seem to think that the quote marks are arranged properly.

Is ther some way I can alter teh ajaxUrl to make this work?

Re: Passing $_GET variables.

PostPosted: Tue Feb 16, 2016 1:29 pm
by lukasnem
Hello,

I would like to ask how can I access to value of $_GET variables in the newest version of mate?

When I define $defaultSessionData like below searchString is empty, I thing it is because of base64_encode of url :

Code: Select all
$defaultSessionData['searchString'] = isset($_GET['search_string']) ? $_GET['search_string'] : '';
$defaultSessionData = base64_encode($this->Editor->jsonEncode($defaultSessionData));


I am using Autocomplete.php example.


Please help me
Best regards

Re: Passing $_GET variables.

PostPosted: Fri Mar 04, 2016 8:18 am
by lukasnem
lukasnem wrote:Hello,

I would like to ask how can I access to value of $_GET variables in the newest version of mate?

When I define $defaultSessionData like below searchString is empty, I thing it is because of base64_encode of url :

Code: Select all
$defaultSessionData['searchString'] = isset($_GET['search_string']) ? $_GET['search_string'] : '';
$defaultSessionData = base64_encode($this->Editor->jsonEncode($defaultSessionData));


I am using Autocomplete.php example.


Please help me
Best regards




Solved

Re: Passing $_GET variables.

PostPosted: Mon Dec 28, 2020 7:56 pm
by jack_c
Could someone (KarelB) please help me with updated code to pass a $_Get variable with the newer version (4.2) of mate? It appears that the functions have changed since the last post on this topic, and I do not know how to apply this.
My goal is to add buttons or a selector to allow changing which table is being edited. In previous versions, I was using a button to change a SESSION variable to do this.
Thanks
Jack