Code:
<?php
$con = mysql_connect("localhost","danijela","1234");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
$company_name = addslashes($_POST['name']);
$contact = addslashes($_POST['contact']);
$phone = addslashes($_POST['phone']);
$email = addslashes($_POST['email']);
$location = addslashes($_POST['location']);
$start_date = addslashes($_POST['start_date']);
$hours = addslashes($_POST['hours']);
$ceiling = addslashes($_POST['ceiling']);
$floor = addslashes($_POST['floor']);
$yes1 = addslashes($_POST['yes']);
$no1 = addslashes($_POST['no']);
$dock_size = addslashes($_POST['dock_size']);
$yes2 = addslashes($_POST['yes2']);
$no2 = addslashes($_POST['no2']);
$door_size = addslashes($_POST['door_size']);
$yes3 = addslashes($_POST['yes3']);
$no3 = addslashes($_POST['no3']);
$crane_size = addslashes($_POST['crane_size']);
$select = addslashes($_POST['select']);
$b_voltage = addslashes($_POST['b_voltage']);
$b_amperage = addslashes($_POST['b_amperage']);
$select2 = addslashes($_POST['select2']);
$p_voltage = addslashes($_POST['p_voltage']);
$p_amperage = addslashes($_POST['p_amperage']);
$equ_amp = addslashes($_POST['equ_amp']);
$source = addslashes($_POST['source']);
$machine_manuf = addslashes($_POST['machine_manuf']);
$serial = addslashes($_POST['serial']);
$machine_wght = addslashes($_POST['machine_wght']);
$d_ht = addslashes($_POST['d_ht']);
$d_wt = addslashes($_POST['d_wt']);
$d_lt = addslashes($_POST['d_lt']);
$address_from = addslashes($_POST['address_from']);
$city_from = addslashes($_POST['city_from']);
$state_from = addslashes($_POST['state_from']);
$address_to = addslashes($_POST['address_to']);
$city_to = addslashes($_POST['city_to']);
$state_to = addslashes($_POST['state_to']);
$additional = addslashes($_POST['additional']);
$soil = addslashes($_POST['soil']);
$size_depth = addslashes($_POST['size_depth']);
$cad_yes = addslashes($_POST['cad_yes']);
$cad_no = addslashes($_POST['cad_no']);
$dimensions = addslashes($_POST['cad_no']);
$p_size = addslashes($_POST['p_size']);
$run_length = addslashes($_POST['run_length']);
$materials = addslashes($_POST['run_length']);
$substance = addslashes($_POST['substances']);
$lift_yes = addslashes($_POST['lift_yes']);
$lift_no = addslashes($_POST['lift_no']);
$lift_size = addslashes($_POST['lift_size']);
$scissors = addslashes($_POST['scissors']);
$boom = addslashes($_POST['boom']);
$insert1=("INSERT INTO customer (name, contact, phone, email, location, start_date) VALUES($name, $contact, $phone, $email, $location, $start_date) ");
$insert2=("INSERT INTO facility (hours, ceiling, floor, yes, no, dock_size, yes2, no2, door_size, yes3, no3, crane_size) VALUES($hours, $ceiling, $floor, $yes, $no, $dock_size, $yes2, $no2, $door_size, $yes3, $no3, $crane_size)");
$insert3=("INSERT INTO electrical (select, b_voltage, b_amperage, select2, p_voltage, p_amperage, equ_amp, distance) VALUES($select, $b_voltage, $b_amperage, $select2, $p_voltage, $p_amperage, $equ_amp, $distance)");
$insert4=("INSERT INTO rigging (machine_manuf, serial, machine_wght, d_ht, d_wt, d_lt, address_from, city_from, state_from, address_to, city_to, state_to, additional) VALUES ($machine_manuf, $serial, $machine_wght, $d_ht, $d_wt, $d_lt, $address_from, $city_from, $state_from, $address_to, $city_to, $state_to, $additional)");
$insert5=("INSERT INTO foundations (soil, size_depth, cad_yes, cad_no, dimensions) VALUES ($soil, $size_depth, $cad_yes, $cad_no, $dimensions)");
$insert6=("INSERT INTO piping (p_size, run_length, materials, substance, lift_yes, lift_no, lift_size, scissors, boom) VALUE (p_size, run_length, materials, substance, lift_yes, lift_no, lift_size, scissors, boom)");
echo "Data has been stored";
mysql_close($con)
?>
<?php
$con = mysql_connect("localhost","danijela","1234");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
$company_name = addslashes($_POST['name']);
$contact = addslashes($_POST['contact']);
$phone = addslashes($_POST['phone']);
$email = addslashes($_POST['email']);
$location = addslashes($_POST['location']);
$start_date = addslashes($_POST['start_date']);
$hours = addslashes($_POST['hours']);
$ceiling = addslashes($_POST['ceiling']);
$floor = addslashes($_POST['floor']);
$yes1 = addslashes($_POST['yes']);
$no1 = addslashes($_POST['no']);
$dock_size = addslashes($_POST['dock_size']);
$yes2 = addslashes($_POST['yes2']);
$no2 = addslashes($_POST['no2']);
$door_size = addslashes($_POST['door_size']);
$yes3 = addslashes($_POST['yes3']);
$no3 = addslashes($_POST['no3']);
$crane_size = addslashes($_POST['crane_size']);
$select = addslashes($_POST['select']);
$b_voltage = addslashes($_POST['b_voltage']);
$b_amperage = addslashes($_POST['b_amperage']);
$select2 = addslashes($_POST['select2']);
$p_voltage = addslashes($_POST['p_voltage']);
$p_amperage = addslashes($_POST['p_amperage']);
$equ_amp = addslashes($_POST['equ_amp']);
$source = addslashes($_POST['source']);
$machine_manuf = addslashes($_POST['machine_manuf']);
$serial = addslashes($_POST['serial']);
$machine_wght = addslashes($_POST['machine_wght']);
$d_ht = addslashes($_POST['d_ht']);
$d_wt = addslashes($_POST['d_wt']);
$d_lt = addslashes($_POST['d_lt']);
$address_from = addslashes($_POST['address_from']);
$city_from = addslashes($_POST['city_from']);
$state_from = addslashes($_POST['state_from']);
$address_to = addslashes($_POST['address_to']);
$city_to = addslashes($_POST['city_to']);
$state_to = addslashes($_POST['state_to']);
$additional = addslashes($_POST['additional']);
$soil = addslashes($_POST['soil']);
$size_depth = addslashes($_POST['size_depth']);
$cad_yes = addslashes($_POST['cad_yes']);
$cad_no = addslashes($_POST['cad_no']);
$dimensions = addslashes($_POST['cad_no']);
$p_size = addslashes($_POST['p_size']);
$run_length = addslashes($_POST['run_length']);
$materials = addslashes($_POST['run_length']);
$substance = addslashes($_POST['substances']);
$lift_yes = addslashes($_POST['lift_yes']);
$lift_no = addslashes($_POST['lift_no']);
$lift_size = addslashes($_POST['lift_size']);
$scissors = addslashes($_POST['scissors']);
$boom = addslashes($_POST['boom']);
$insert1=("INSERT INTO customer (name, contact, phone, email, location, start_date) VALUES($name, $contact, $phone, $email, $location, $start_date) ");
$insert2=("INSERT INTO facility (hours, ceiling, floor, yes, no, dock_size, yes2, no2, door_size, yes3, no3, crane_size) VALUES($hours, $ceiling, $floor, $yes, $no, $dock_size, $yes2, $no2, $door_size, $yes3, $no3, $crane_size)");
$insert3=("INSERT INTO electrical (select, b_voltage, b_amperage, select2, p_voltage, p_amperage, equ_amp, distance) VALUES($select, $b_voltage, $b_amperage, $select2, $p_voltage, $p_amperage, $equ_amp, $distance)");
$insert4=("INSERT INTO rigging (machine_manuf, serial, machine_wght, d_ht, d_wt, d_lt, address_from, city_from, state_from, address_to, city_to, state_to, additional) VALUES ($machine_manuf, $serial, $machine_wght, $d_ht, $d_wt, $d_lt, $address_from, $city_from, $state_from, $address_to, $city_to, $state_to, $additional)");
$insert5=("INSERT INTO foundations (soil, size_depth, cad_yes, cad_no, dimensions) VALUES ($soil, $size_depth, $cad_yes, $cad_no, $dimensions)");
$insert6=("INSERT INTO piping (p_size, run_length, materials, substance, lift_yes, lift_no, lift_size, scissors, boom) VALUE (p_size, run_length, materials, substance, lift_yes, lift_no, lift_size, scissors, boom)");
echo "Data has been stored";
mysql_close($con)
?>
[Ovu poruku je menjao Nemanja Avramović dana 16.12.2006. u 08:44 GMT+1]