Smarty Variable: Reversed Variable


Smarty Variable Step by Step Tutorial - Part 5: Following how to access value from http parameter and others:

GET

From this url: http://localhost/test/smarty/test.php?page=about

<html>
  <head>
    <title>Page {$smart.get.page}</title>
  </head>
  <body bgcolor="{#bodyColor#}">
    page: {$smarty.get.page} <br>
  </body>
</html>

POST

Example from http Post:

{$smarty.post.page}

Cookie

Example from cookie "page":

{$smarty.cookie.page}

SERVER

{$smarty.server.SERVER_NAME}

session

Example from session "page":

{$smarty.session.page}



Bookmark and Share Tag: smarty, template, variable, reversed variable Category: PHP Classes Post : May 03rd 2008 Read: 33,289

advertisements


blog comments powered by Disqus