hola amigos.
estuve creado un pagina que cuando lo ejecute me agregue registros:
e probado con un registro primero pero no me sale ningun error y no agrega:
==========
<?php
{
include_once("../config.php");
$step_ok = 1;
$link = mysql_connect($db_host, $db_login, $db_pwd);
if (!$link) {
print "Cannot connect to DB!<br>Error: ".mysql_error().".<br>revise la configuracion del archivo.";
$step_ok = 0;
}
$db_sel = mysql_select_db($db_name, $link);
if (!$db_sel) {
print "Cannot select DB!<br>Error: ".mysql_error().".<br>revise la configuracion del archivo.";
$step_ok = 0;
}
///////////////////////////////////////////////////////////////////////////
// insertar tablas
///////////////////////////////////////////////////////////////////////////
if($step_ok == 1) {
$sql = "INSERT INTO Datosper (id, password, dni, edad, vive) VALUES ('null', 1, 'N', 3, 'Y')";
$rst = mysql_query($sql);
if(!$rst) {
print "<br>Error: " . mysql_error() . "<br>";
$step_ok = 0;
}
mysql_close();
?>
=======
otra: pregunta como podria hacer para que agregue varios registros al ejecutar la web o mejor dicho llamarla.