Ver Mensaje Individual
  #1 (permalink)  
Antiguo 25/08/2008, 18:18
aleslf
 
Fecha de Ingreso: septiembre-2006
Mensajes: 17
Antigüedad: 17 años, 8 meses
Puntos: 0
Agregar registros

Hola mi problemilla es el siguiente con el codigo que esta abajo agrego un registro pero como hacer para agregar mas registros he intentado varias cosas y nada hechenme una mano por fa



<?php
$conexion = mysql_connect('localhost', 'root', 'pat526');
mysql_select_db('inmobiliaria');
?>
<html>
<head>
<title>Mantenimiento de Ciudades</title>
</head>
<body>
<h1>Mantenimiento de Ciudades</h1>
<?php
if (isset($_POST['txtNombre'])) {
@mysql_query("INSERT INTO ciudades SET nombre = '" . $_POST['txtNombre'] . "'");
echo 'Ciudad agregada correctamente';
} else {
?>
<form action="ciudades.php" method="post" name="frmDatos" id="frmDatos">
<label>Nombre:</label>
<br>
<input type="text" name="txtNombre" id="txtNombre">
<input type="submit" name="cmdAceptar" id="cmdAceptar" value="Aceptar">
</form>
<?php
}
mysql_close($conexion);
?>
</body>
</html>