function equisg($xx1,$yy1) { if ($xx1 > 374 || $yy1 > 290) { if ($xx1 > $yy1) { $chicopor1 = $yy1*290; $division1 = $chicopor1/$xx1; $yy1= $division1; $xx1= 374; } else { $chicopor1 = $xx1*374; $division1 = $chicopor1/$yy1; $xx1= $division1; $yy1= 290; } } else { $yy1= $yy1; $xx1= $xx1; } return $xx1; } function yesg($xx1,$yy1) { if ($xx1 > 374 || $yy1 > 290) { if ($xx1 > $yy1) { $chicopor1 = $yy1*290; $division1 = $chicopor1/$xx1; $yy1= $division1; $xx1= 374; } else { $chicopor1 = $xx1*374; $division1 = $chicopor1/$yy1; $xx1= $division1; $yy1= 290; } } else { $yy1= $yy1; $xx1= $xx1; } return $yy1; } function equisgc($xx1,$yy1) { if ($xx1 > 50 || $yy1 > 50) { if ($xx1 > $yy1) { $chicopor1 = $yy1*50; $division1 = $chicopor1/$xx1; $yy1= $division1; $xx1= 50; } else { $chicopor1 = $xx1*50; $division1 = $chicopor1/$yy1; $xx1= $division1; $yy1= 50; } } else { $yy1= $yy1; $xx1= $xx1; } return $xx1; } function yesgc($xx1,$yy1) { if ($xx1 > 50 || $yy1 > 50) { if ($xx1 > $yy1) { $chicopor1 = $yy1*50; $division1 = $chicopor1/$xx1; $yy1= $division1; $xx1= 50; } else { $chicopor1 = $xx1*50; $division1 = $chicopor1/$yy1; $xx1= $division1; $yy1= 50; } } else { $yy1= $yy1; $xx1= $xx1; } return $yy1; } function conectar() { $base_de_datos = "villas"; $db_usuario = "villas"; $db_password = "680107"; //$base_de_datos = "villas"; //$db_usuario = "root"; //$db_password = ""; //if (!($link = mysql_connect("localhost", $db_usuario, $db_password))) if (!($link = mysql_connect("localhost", $db_usuario, $db_password))) { echo "Error conectando a la base de datos."; exit(); } if (!mysql_select_db($base_de_datos, $link)) { echo "Error seleccionando la base de datos."; exit(); } return $link; } $vconsec= $_GET['id']; $db = conectar(); $resultadosxx = mysql_query("SELECT * from villa where id = '".$vconsec."' "); //echo "SELECT * from villa where id_villa = '".$vconsec."' "; //exit; $corri=mysql_fetch_array($resultadosxx); $id= $corri["id"]; $clave= $corri["id_villa"]; $nombre= $corri["nombre"]; ?>