mrtnz

Untitled

Apr 23rd, 2012
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.27 KB | None | 0 0
  1. <?php
  2.  
  3.     $con = mysql_connect("localhost","signsplus","101010");
  4.    
  5.     if (!$con) {
  6.       die('Could not connect: ' . mysql_error());
  7.     };
  8.    
  9.    
  10.     //select db
  11.     mysql_select_db("jobs", $con);     
  12.  
  13.  
  14.     //client dtails
  15.     $nombre = $_POST['cliente'];
  16.     $phone = $_POST['phone'];
  17.     $email = $_POST['email'];
  18.     $sp = $_POST['sp'];
  19.    
  20.     //order date
  21.     $entrada = $_POST['entrada'];
  22.     $entrega = $_POST['entrega'];
  23.  
  24.     //order details
  25.     $width = $_POST['medidaX'];
  26.     $height = $_POST['medidaY'];
  27.     $arte = $_POST['Si'] || $_POST['No'];
  28.     $terminaciones = $_POST['terminaciones'];
  29.     $descripcion = $_POST['descripcion'];
  30.    
  31.     //car wraps
  32.     $marca = $_POST['marca'];
  33.     $modelo = $_POST['modelo'];
  34.     $material = $_POST['material'];
  35.    
  36.     //extra details
  37.     $rush = '$rush';
  38.     $status = '$status';
  39.  
  40.  
  41.     $cq = "INSERT INTO Cliente (Nombre, Telefono, Email) VALUES (".$nombre.",".$phone.",".$email.",".$sp.")";
  42.     $dq = "INSERT INTO Fecha (Entrada, Entrega) VALUES (".$entrada.",".$entrega.")";
  43.     $iq = "INSERT INTO Descripcion (MedidaX, MedidaY) VALUES (".$width.",".$height.",".$arte.",".$terminaciones.",".$descripcion.")";
  44.    
  45.     $ce = mysql_query($cq);
  46.     $de = mysql_query($dq);
  47.     $ie = mysql_query($iq);
  48.    
  49.     list( $ce, $de, $ie) = $inserts;
  50.    
  51.     mysql_query($inserts);
  52.                    
  53.                    
  54.  
  55.     mysql_close($con);
  56.    
  57. ?>
Advertisement
Add Comment
Please, Sign In to add comment