Joel Posted January 27, 2007 Share Posted January 27, 2007 Ok, this seems to be a Smarty/PHP problem. It's driving me nuts. I've got a custom page that is called from the account details page. In the custom.php, I'm setting the variables like this: $details['test'] = "Testing"; $details['id'] = $_POST['id']; $details['domain'] = $_POST['domainname']; $smarty->assign('details', $details); If I do a print_r on $details right here, all the data is there. But... In my custom.tpl, I have this: {$details.id}</p> {$details.test}</p> {$details.domain}</p> Only $details.test is displayed. When I load the page in my browser, all I get is "Testing". Debug shows this: Array (3) test => Testing id => empty domain => empty What am I missing here? It's probably something simple, right? 0 Quote Link to comment Share on other sites More sharing options...
welch Posted January 27, 2007 Share Posted January 27, 2007 From what I understand, you are pulling the template / smarty variables to the custom.php page. global $variables; $var1 = $variables->get_template_vars('var1'); $var2 = $variables->get_template_vars('var2'); 0 Quote Link to comment Share on other sites More sharing options...
Joel Posted January 29, 2007 Author Share Posted January 29, 2007 Thanks, but that's not what I'm looking for. I'm using POST to send the ID & domain name to my custom.php. And it gets there just fine. I can manipulate the vales within custom.php. The problem is that when I assign those values to a new variable, they don't make it to the custom.tpl. Also, the following command returns false for some reason: isset($_POST['id']) Again, I can echo (or print) the POST data, but it never reaches the custom.tpl. By the way, this works if I switch from POST to GET. But I'd rather not do that. 0 Quote Link to comment Share on other sites More sharing options...
WHMCS CEO Matt Posted January 29, 2007 WHMCS CEO Share Posted January 29, 2007 I can't see any errors in your code so not sure why it wouldn't be working. Maybe try posting about the issue on the Smarty forums? 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.