Exemple #1
0
        $smarty->assign('element', 'username');
        break;
    case 'firstname':
        $smarty->assign('element', 'firstname');
        break;
    case 'secondname':
        $smarty->assign('element', 'secondname');
        break;
    case 'phonenumber':
        $smarty->assign('element', 'phonenumber');
        break;
    case 'password':
        $smarty->assign('element', 'password');
        break;
    case 'birthdate':
        $smarty->assign('element', 'birthdate');
        break;
    case 'occupation':
        $smarty->assign('element', 'occupation');
        break;
    case 'gender':
        $smarty->assign('element', 'gender');
        break;
    case 'livesin':
        $smarty->assign('countries', getAllCountries());
        $smarty->assign('cities', getAllCities());
        $smarty->assign('element', 'livesin');
        break;
}
$smarty->assign('content', 'users/edit.tpl');
$smarty->display('application.tpl');
Exemple #2
0
<?php

error_reporting(-1);
ini_set('display_errors', 'On');
require 'include/class.Country.php';
?>

<!DOCTYPE HTML>
<html dir="rtl" lang="ar">
<head>
	<meta charset="utf-8" />
  <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>Test</title>
</head>
<body>

  <select>
    <?php 
$countrieslist = getAllCountries();
foreach ($countrieslist as $country) {
    echo '<option value="' . $country->code . '">' . $country->name . '</option>' . "\n";
}
?>
  </select>

</body>
</html>