Params and special chars in variables

Talk about writing modules and plugins for CMS Made Simple, or about specific core functionality. This board is for PHP programmers that are contributing to CMSMS not for site developers
Post Reply
piwko28
New Member
New Member
Posts: 3
Joined: Sat Sep 18, 2010 11:37 am

Params and special chars in variables

Post by piwko28 »

Hi. I'm working on the admin panel placed on the webside.
Standard CMSMS form..:

Code: Select all

$this->smarty->assign('startform', $this->CreateFormStart($id, 'example_action', $returnid, 'post', 'multipart/form-data'));
and some inputs, simplest:

Code: Select all

$smarty->assign('example', $this->CreateInputText($id, 'example', $params['example'], 40, 200));
I'm trying to send something like this:
(just brackets)
Unfortunately, var_dump from $params['example'] prints: <>
But var_dump from $_POST['cntnt01example'] prints brackets correctly.
Similar action on standard admin panel works fine. Why it has happend?
Last edited by piwko28 on Thu Sep 23, 2010 4:24 pm, edited 1 time in total.
NaN

Re: Params and special chars in variables

Post by NaN »

Use html_entity_decode($params['example']).
piwko28
New Member
New Member
Posts: 3
Joined: Sat Sep 18, 2010 11:37 am

Re: Params and special chars in variables

Post by piwko28 »

Works, thanks :)
But why it make a difference I work on admin panel or not?
Post Reply

Return to “Developers Discussion”