Jump to content

Not passing variables?


Joel

Recommended Posts

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated