Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1003917
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T08:03:08+00:00 2026-05-16T08:03:08+00:00

I am working on smarty template files. core php of that template engine are

  • 0

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!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T08:03:08+00:00Added an answer on May 16, 2026 at 8:03 am

    You should assign all needed variables to Smarty from the PHP end. Don’t use Ajax for this.

    If $clientemail is 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.

     $conf = array();
     $conf["clientemail"] = "xyz@domain.com";
    
     ...........
    
     $Smarty = new Smarty();  // or whichever way you do it
     $Smarty->assign("conf", $conf);
    
     ............
    
     Then in the template:
     {$conf.clientemail}
    

    If $clientemail is a user-entered value, you could store it in $_SESSION (if you have a session running) and fetch it:

     In the PHP script that processes the form:
     $_SESSION["clientemail"] = ..... wherever clientemail comes from
    
     ...........
    
     $Smarty = new Smarty();  // or whichever way you do it
     $Smarty->assign("clientemail", $_SESSION["clientemail"]);
    
     ............
    
     Then in the template:
     {$clientemail}
    

    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.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been working on a site that has a lot of PHP/Smarty involved, I've
I am trying to get Smarty setup and working, so that I can install
I've been working with the Smarty Template Engine with display_errors = Off . Turning
I working on smarty template. I need to have numbers to my list array
I am working on dynamic page. Using {$pagetitle} smarty tag I get selectbox something
First-timer here, I hope I explain this well enough... PHP/Smarty, I'm working on a
SOLVED: Error in template file I have Smarty setup like this: require_once 'smarty/Smarty.class.php'; $smarty
Just a general question for those of you working with the Smarty templating engine.
I am working on a program with a Smarty template, where do the $variables
I am working with Social Engine which is based on Zend Framework and Smarty

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.