Source of: /ADI/auth-db-sessions/signup_smarty.php

<?php

session_start
();

// put full path to Smarty.class.php
require_once('/usr/share/php/smarty/libs/Smarty.class.php');
$smarty = new Smarty();

$smarty->template_dir = 'templates';
$smarty->compile_dir = 'templates_c';

      
   if (isset(
$_GET['m'])) {       
       if (
$_GET['m'] == "1") {$smarty->assign('MESSAGE', 'One or more required fields were left blank or are invalid. Please fill them in and try again.');}
       if (
$_GET['m'] == "2") {$smarty->assign('MESSAGE', 'A user already exists with your chosen userid. Please try another.');}
   }
   else
       {
$smarty->assign('MESSAGE', '');}

   if (isset(
$_SESSION['newemail']))
      
$smarty->assign('newemail', $_SESSION['newemail']);
   else
      
$smarty->assign('newemail', '');
  
   if (isset(
$_SESSION['newname']))
      
$smarty->assign('newname', $_SESSION['newname']);
   else
      
$smarty->assign('newname', '');
  
   if (isset(
$_SESSION['newnotes']))
      
$smarty->assign('newnotes', $_SESSION['newnotes']);
   else
      
$smarty->assign('newnotes', '');

   if (isset(
$_SESSION['newid']))
      
$smarty->assign('newid', $_SESSION['newid']);
   else
      
$smarty->assign('newid', '');

 
// Actualiza o template
 
$smarty->display('signup_template.tpl');
 
?>