phpeveryday.com

The best tutorial of php, php framework, php strategies, object oriented oriented,


Smarty Variable: Reversed Variable

Tag: smarty, template, variable, reversed variable   Category: PHP Classes
post: 03 May 2008 read: 281


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}



| Give Your Opinion | Recommend
Share and Bookmark to: These icons link to social bookmarking sites where readers can share and discover new web pages.
digg del.icio.us technorati Ma.gnolia BlinkList

Recommended articles by other readers:
Web Services: How PHP Kiss VB.NET? (Part 1)
Chart: How to Build Cool Animation Real Time Chart
Joomla: Fast Road to Understand Component Programming
Email: Send Attachement Mail
CAPTCHA - part 3 : "Are you human or ....?" (Build Your CAPTCHA)

What do You Think?
Your Name *:
Email *:
(Will not be published)
Website/URL:
Your Comment *:
* Required


615
posting