Hello,
i have this php code. Its for sms insertion of links in to table
<table border="1">
<?PHP
$db_user = 'user';
$db_pass = 'pass';
$db_name = 'name';
$db_host = 'localhost';
if(mysql_connect($db_host,$db_user,$db_pass)) {
mysql_select_db($db_name);
mysql_query("CREATE TABLE IF NOT EXISTS smsads(id bigint unsigned primary key auto_increment, link varchar(255), fromnum varchar(60))");
$res = mysql_query("SELECT * FROM smsads ORDER BY id DESC LIMIT 10");
while($row = mysql_fetch_object($res)) {
$http_link = $row->link;
if(strstr($http_link, 'http') === FALSE) $http_link = 'http://'.$http_link;
echo "<tr><td><a href=\"{$http_link}\" target=\"_blank\">{$row->link}</a></td></tr>";
}
}
?>
</table>
The problem is that i use tpl files for the visual part and all my other tables are in tpl. How can i insert the table above in my tpl file, whitout loosing its functions?