$auth = $_GET['auth']; if($auth != '1'){ echo("You are not authorized to view this information."); exit(); } $dbcnx = @mysql_connect('mysql.plainhost.com', 'ecosmar_ecosmart', 'ecoman1'); if (!$dbcnx) { echo("
ecosmartinc.com" .
"
Sorry. Problems connecting to Data Base " .
"
Please try again later.");
exit();
}
mysql_select_db('ecosmar_products', $dbcnx);
if (! @mysql_select_db('ecosmar_products') ) {
echo("
ecosmartinc.com" .
"
Sorry. Problems communicating with Data Base " .
"
Please try again later.");
exit();
}
$result = mysql_query("SELECT id,productname,description,list,retail,wholesale,dealer,distributor,cost,up_date FROM prices");
if (!$result) {
echo 'Could not run query: ' . mysql_error();
exit();
}
while($row = mysql_fetch_array($result)) {
echo("$row[0],$row[1],$row[2],$row[3],$row[4],$row[5],$row[6],$row[7],$row[8],$row[9]
");}
?>