Ver Mensaje Individual
  #2 (permalink)  
Antiguo 01/09/2007, 18:45
Avatar de urgido
urgido
 
Fecha de Ingreso: febrero-2005
Mensajes: 2.351
Antigüedad: 20 años
Puntos: 25
Re: Eliminar la base de datos con uso de un combobox

Código PHP:
<?
if($_POST['Submit']){
$link=mysql_connect("localhost","admin","");

$select=$_POST['select'];

$result=mysql_drop_db($select,$link);
if(!
$result)
{
    
printf("No se ha podido eliminar la Base de Datos<P>\n");
}else{
    
printf("La Base de Datos se ha eliminado correctamente<P>\n");
}
mysql_close($link);
exit;
}
?>
<html>
<head>
<title>Eliminar</title>
</head>
<body>
<form method="post" action="<? echo $_SERVER['PHP_SELF']; ?>">
Eliminar Base de datos<br>
Seleccione la Base de datos:
  <select name="select">
  </select>
  <br>
  <br>
  <input type="submit" name="Submit" value="Eliminar">
</form>
</body>
</html>
__________________
Hospedaje Web al mejor costo!