smarty
//db configuration
include "config.php";
if(!($db = @mysql_connect($server, $db_user, $db_pass))) //connect to database
die("Couldn't connect to the database.");
if(!@mysql_select_db($db_name, $db)) //select database
die("Database doesn't exist!");
$sql = "SELECT * FROM users";
if(($result = @mysql_query($sql, $db)) == 0)
{
echo "nDatabase error: ".mysql_error()."
n";
die("MySQL Said: " . mysql_error());
}
$user = array();
?>
while($tmp = mysql_fetch_assoc($result))
{
?>
}
?>
Not able able to convert thiscode into smarty.