I am working on smarty template files.
core php of that template engine are encoded with ioncube.
So I am restricted to get certain values on certain pages only.
For Example,
I get value of {$clientemail} only on clientareadetails.php
on clientprofile.php value of {$clientemail} is null
So, Is it possible to fetch values using smarty, php, JQuery from another page ?
All my pages are residing on single domain only.
Any help will be appreciated.
Thank You!
You should assign all needed variables to Smarty from the PHP end. Don’t use Ajax for this.
If
$clientemailis a fixed value in your script, the best way would be to keep a central configuration array with all values in a PHP file, including that file in every script instance (include "conf.php"), and passing that array as a Smarty variable.If
$clientemailis a user-entered value, you could store it in$_SESSION(if you have a session running) and fetch it:Note that this example will give you trouble if the user has two or more windows open and is filling out the same form at the same time:
$_SESSION["clientemail"]would be overwritten by each form submission.