madesign: auf externe Datenbank zugreifen

Beitrag lesen

Also jetzt readfile oder include benutzen?
Ich muss nur noch die "Go to Apartamento ID" Funktion zum laufen bringen.

Code:
<?
 include('db.php');

if(isset($_GET['action']) && $_GET['action'] == "search")
 {
  if(is_numeric($_GET['id']))
  {
   $sql = "SELECT * FROM apartments WHERE id apartments = ".$_GET['id']."";
   $result = mysql_query($sql);

if(mysql_num_rows($result) > 0)
   {
    header("Location: apartments.php?id=".$_GET['id']."");
   }else{
    $error = "No hay registro con este ID.";
   }
  }else{
   $error = "No hay registro con este ID.";
  }
 }
?>

Michael