I have a file called incdist.php with this code:
Code:
<?php
################################################################################################## Configuration
#################################################################################################
$server = "localhost";
$db_user = "user";
$db_pass = "password";
$database = "database";
# End Configuration - DO NOT EDIT BEHIND THIS LINE !!!
#################################################################################################
mysql_connect($server, $db_user, $db_pass) or die ("Database CONNECT Error");
$sql = "SELECT id, provincia, nombre, calle, poblacion, codpos, telefono, contacto, productos, CIF, visible FROM distribuidores where visible=1 ORDER BY provincia ASC";
mysql_db_query($database, $sql) or die("Database Select Error");
$result = mysql_query($sql) or print(mysql_error());
echo "<table width=\"95%\" border=\"1\" cellspacing=\"0\" cellpadding=\"1\" align=\"center\" >\n\r";
echo "<tr><td><u>PROVINCIA</u></td><td><u>DISTRIBUIDOR</u></td><td><u>DIRECCION</u></td><td><u>CONTACTO</u></td><td><u>PRODUCTOS</u></td></tr>\n\r";
while ($arow = mysql_fetch_array($result)) {
echo "<tr><td>$arow[provincia]<td>$arow[nombre]<td>$arow[calle]
$arow[codpos] $arow[poblacion]<td>$arow[telefono]
$arow[contacto]<td>$arow[productos]</td>\n\r";
echo "</tr>\n\r";
} //end while
echo "</table>";
?>
This file runs perfect by itself. I have tried to included on a .TPL using this code
Code:
{php}
include('incdist.php');
{/php}
It doens't work. Browser keeps running and running.... Nothing is coming out.
Any clue?????
Dave
X-CART PRO 4.0.17