
30/04/2009, 04:24
|
 | | | Fecha de Ingreso: abril-2007 Ubicación: Lima - Peru
Mensajes: 505
Antigüedad: 17 años, 10 meses Puntos: 4 | |
Respuesta: conectar php a mysql <?php
$state = false;
if ($_POST['action'] == "add") {
$conexion = mysql_connect("localhost", "usuario", "contraseña");
mysql_select_db("basededatos", $conexion);
$que = "INSERT INTO guia (guiaderemision, puntodepartida, puntodellegada, fechadeiniciodetraslado, costominimo, nombredeldestinatario) ";
$que.= "VALUES ('".$_POST['num']."','".$_POST['part']."', '".$_POST['llega']."', '".$_POST['fecha']."', '".$_POST['costo']."', '".$_POST['nombredest']."') ";
$res = mysql_query($que, $conexion) or die(mysql_error());
$state = true;
}
?> |