esta esto bien??
$bd=mysql_connect("www.ccc.es", "usuario", "pass");
if (!$bd) {
die("Error al intentar conectar: ".mysql_error());
Exit();
}else{
$db_link = mysql_select_db('dbase', $bd);
if(!$db_link) {
die("Error al intentar seleccionar la base de datos". mysql_error());
Exit();
}
$var_usuario = $_POST["usuario"];
$var_orden=$_POST["id"];
$sql = mysql_query("SELECT * FROM customers C, orders_total OT, orders O WHERE O.orders_id =".$var_orden." and OT.ORDERS_ID=O.orders_id and OT.title='Total:' AND C.customers_email_address = '".$var_usuario."'", $db_link) or die(mysql_error());
$row = mysql_fetch_array($sql);
echo "<strong>".$row['customers_firstname']."</strong><br>";
echo "Direccion: ".$row['customers_lastname']."<br>";
echo "clave: ".$row['customers_password']."<br><br>";
}
mysql_close($db_link);