este es mi php donde se ingresa e inserta el registro nuevo
Código PHP:
<?php
require('functions.php');
if(isset($_POST['submit'])){
require('clases/cliente.class.php');
$num_serie = htmlspecialchars(trim($_POST['num_serie']));
$num_resolucion = htmlspecialchars(trim($_POST['num_resolucion']));
$num_factura = htmlspecialchars(trim($_POST['num_factura']));
$Marca = htmlspecialchars(trim($_POST['Marca']));
$Modelo = htmlspecialchars(trim($_POST['Modelo']));
$Proveedor = htmlspecialchars(trim($_POST['Proveedor']));
$Servicio = htmlspecialchars(trim($_POST['Servicio']));
$bodega_des = htmlspecialchars(trim($_POST['bodega_des']));
$compra_fecha = htmlspecialchars(trim($_POST['compra_fecha']));
$Valor = htmlspecialchars(trim($_POST['Valor']));
$ingreso = htmlspecialchars(trim($_POST['ingreso']));
$num_inventario = htmlspecialchars(trim($_POST['num_inventario']));
$codificacion = htmlspecialchars(trim($_POST['codificacion']));
$tipo = htmlspecialchars(trim($_POST['tipo']));
$objCliente=new Cliente;
if ( $objCliente->insertar(array($num_serie,$num_resolucion,$num_factura,$Marca,$Modelo,$Proveedor,$Servicio,$bodega_des,$compra_fecha,$Valor,$ingreso,$num_inventario,$codificacion,$tipo)) == true){
echo 'Datos guardados';
}else{
echo 'Se produjo un error. Intente nuevamente';
}
}else{
?>
<form id="frmClienteNuevo" name="frmClienteNuevo" method="post" action="nuevo.php" onsubmit="GrabarDatos(); return false">
<p>
<label>Numero Serie<br />
<input class="text" type="text" name="num_serie" id="num_serie" />
</p>
<p>
<label>Numero Resolucion<br />
<input class="text" type="text" name="num_resolucion" id="num_resolucion" />
</p>
<p>
<label>Numero Factura<br />
<input class="text" type="text" name="num_factura" id="num_factura" />
</p>
<p>
<label>Marca<br />
<input class="text" type="text" name="Marca" id="Marca" />
</label>
</p>
<p>
<label>Modelo<br />
<input class="text" type="text" name="Modelo" id="Modelo" />
</label>
</p>
<p>
<label>Proveedor<br />
<input class="text" type="text" name="Proveedor" id="Proveedor" />
</label>
</p>
<p>
<label>Servicio<br />
<input class="text" type="text" name="Servicio" id="Servicio" />
</label>
</p>
<p>
<label>Bodega destino<br />
<input class="text" type="text" name="bodega_des" id="bodega_des" />
</label>
</p>
<p>
<label>Fecha Compra <a onclick="show_calendar()" style="cursor: pointer;">
<small>(calendario)</small>
</a><br />
<input readonly="readonly" class="text" type="text" name="compra_fecha" id="compra_fecha" />
<div id="calendario" style="display:none;"><?php calendar_html() ?></div>
</label>
</p>
<p>
<label>Valor<br />
<input class="text" type="text" name="Valor" id="Valor" />
</label>
</p>
<p>
<label>Ingreso<br />
<input class="text" type="text" name="ingreso" id="ingreso" />
</label>
</p>
<p>
<p><label>Numero Inventario<br />
<input class="text" type="text" name="num_inventario" id="num_inventario" />
</label>
</p>
<p>
<label>Codificacion<br />
<input class="text" type="text" name="codificacion" id="codificacion" />
</label>
</p>
<p>
<label>Tipo Especie<br />
<input class="text" type="text" name="tipo" id="tipo" />
</label>
</p>
<input type="submit" name="submit" id="button" value="Enviar" />
<label></label>
<input type="button" class="cancelar" name="cancelar" id="cancelar" value="Cancelar" onclick="Cancelar()" />
</p>
</form>
<?php
}
?>