I need to pass a value of a php variable to another file using extjs4
I have this at the top of my page:
$userid = $_POST['userid'];
This is my extjs code
echo("
{
title: 'Users',
xtype: 'gridpanel',
autoScroll: true,
layout: 'fit',
store: {
storeId: 'test',
fields: [
{name: 'ID', type: 'string'},
{name: 'Name', type: 'string'},
{name: 'Admin', type: 'string'}
],
proxy: {
type: 'ajax',
url : 'GetScripts/getUsers.php',
reader: 'json'
},
autoLoad: true
},
i need to pass $userid to getUsers.php.
Can I get some help on this one?
In your proxy you can specify URL parameters like so:
Additionally, when you load your store you can pass parameters as well