It's built out of 2 files:
1) HTML that takes the info anf passes it to a processing page
2)the processing page sending it to the DB(mysql)
Page1(input) code:
<?php
require('main.php');
echo '<html><body>
<form action="insert_sql.php" methodd="post">
<h3>GENERAL</h3><br>
Model name:<input type=text name="name"><br>
Available colors:<input type=text name="colors"><br>
<h3>BODY</h3><br>
Top specie:<input type=text name="body_top"><br>
Back specie:<input type=text name="body_back"><br>
Binding specie:<input type=text name="body_binding"><br>
<h3>Electronics</h3><br>
Neck Pickups:<input type=text name="elec_pickups_neck"><br>
Mid Pickups:<input type=text name="elec_pickups_mid"><br>
Bridge Pickups:<input type=text name="elec_pickups_bridge"><br>
Controls:<input type=text name="elec_controls"><br>
<h3>Neck</h3><br>
Species:<input type=text name="neck_specie"><br>
Profile:<input type=text name="neck_profile"><br>
Headstock Pitch:<input type=number name="neck_headstock_pitch"><br>
Thickness at 1st Fret:<input type=number name="neck_thickness_1"><br>
Thickness at 12th Fret:<input type=number name="neck_thickness_12"><br>
Heel Length:<input type=number name="neck_heel_length"><br>
Neck Joint Location:<input type=number name="neck_joint"><br>
<h3>Fingerboard</h3><br>
Specie:<input type=text name="finger_specie"><br>
***Scale:<input type=number><br>
Total length:<input type=number name="finger_total_length"><br>
Number of frets:<input type=number name="finger_num_frets"><br>
Nut width:<input type=number name="finger_nut_width"><br>
Width at 12th fret:<input type=number name="finger_width_12"><br>
Inlays:<input type=text name="finger_inlays"><br>
Binding:<input type=text name="finger_binding"><br>
<h3>Hardware</h3><br>
Plating Finish:<input type=text name="hard_plating_finish"><br>
Tailpiece:<input type=text name="hard_tailpiece"><br>
Bridge:<input type=text name="hard_bridge"><br>
Knobs:<input type=text name="hard_knobs"><br>
Tuners:<input type=text name="hard_tuners"><br>
<input type=submit>
</body>
</html>
'
?>
Page2(processing) code:
<?php
//GENERAL
$name = $_POST['name'];
$colors = $_POST['colors'];
$general_query = "INSERT INTO models(name,colors) VALUES($name, $colors)";
//BODY
$body_top = $_POST['body_top'];
$body_back = $_POST['body_back'];
$body_binding = $_POST['body_binding'];
$body_query= "INSERT INTO body(top, back, binding) VALUES ($body_top, $body_back, $body_binding)";
//ELECTRONICS
$elec_pickups_neck = $_POST['elec_pickups_neck'];
$elec_pickups_mid = $_POST['elec_pickups_mid'];
$elec_pickups_bridge = $_POST['elec_pickups_bridge'];
$elec_controls = $_POST['elec_controls'];
$elec_query = "INSERT INTO electronics(pickups_neck,pickups_mid, pickups_bridge, controls VALUES($elec_pickups_neck,$elec_pickups_mid,$elec_pickups_bridge, $elec_controls)";
//NECK
$neck_specie = $_POST['neck_specie'];
$neck_profile = $_POST['neck_profile'];
$neck_headstock_pitch = $_POST['neck_headstock_pitch'];
$neck_thickness_1 = $_POST['neck_thickness_1'];
$neck_thickness_12 = $_POST['neck_thickness_12'];
$neck_heel_length = $_POST['neck_heel_length'];
$neck_joint = $_POST['neck_joint'];
$neck_query = "INSERT INTO neck(specie, profile, headstock_pitch, thickness_1, thickness_12, heel_length, joint) VALUES($neck_specie,$neck_profile,$neck_headstock_pitch, $neck_thickness_1, $neck_thickness_12, $neck_heel_length, $neck_joint)";
//FINGERBOARD
$finger_specie = $_POST['finger_specie'];
$finger_total_length = $_POST['finger_total_length'];
$finger_num_frets = $_POST['finger_num_frets'];
$finger_nut_width = $_POST['finger_nut_width'];
$finger_width_12 = $_POST['finger_width_12'];
$finger_inlays = $_POST['finger_inlays'];
$finger_binding = $_POST['finger_binding'];
$finger_query= "INSERT INTO fingerboard(specie, scale_length, total_length, num_frets, nut_width, width_12, inlays, binding) VALUES ($finger_specie, $finger_total_length, $finger_num_frets, $finger_nut_width, $finger_width_12, $finger_inlays, $finger_binding)";
//HARDWARE
$hard_plating_finish = $_POST['hard_plating_finish'];
$hard_tailpiece = $_POST['hard_tailpiece'];
$hard_bridge = $_POST['hard_bridge'];
$hard_knobs = $_POST['hard_knobs'];
$hard_tuners = $_POST['hard_tuners'];
$hard_query= "INSERT INTO hardware(plating_finish, tailpiece, bridge, knobs, tuners) VALUES ($hard_plating_finish, $hard_tailpiece, $hard_bridge, $hard_knobs, $hard_tuners)";
$result1 = mysql_query($general_query);
$result2 = mysql_query($body_query);
$result3 = mysql_query($elec_query);
$result4 = mysql_query($neck_query);
$result5 = mysql_query($finger_query);
$result6 = mysql_query($hard_query);
?>
The output I get(entering the pages through the host):
connected successfully to MySQL server.
Notice: Undefined index: name in c:\program files\easyphp1-8\www\insert_sql.php on line 5
Notice: Undefined index: colors in c:\program files\easyphp1-8\www\insert_sql.php on line 6
Notice: Undefined index: body_top in c:\program files\easyphp1-8\www\insert_sql.php on line 9
Notice: Undefined index: body_back in c:\program files\easyphp1-8\www\insert_sql.php on line 10
Notice: Undefined index: body_binding in c:\program files\easyphp1-8\www\insert_sql.php on line 11
Notice: Undefined index: elec_pickups_neck in c:\program files\easyphp1-8\www\insert_sql.php on line 14
Notice: Undefined index: elec_pickups_mid in c:\program files\easyphp1-8\www\insert_sql.php on line 15
Notice: Undefined index: elec_pickups_bridge in c:\program files\easyphp1-8\www\insert_sql.php on line 16
Notice: Undefined index: elec_controls in c:\program files\easyphp1-8\www\insert_sql.php on line 17
Notice: Undefined index: neck_specie in c:\program files\easyphp1-8\www\insert_sql.php on line 20
Notice: Undefined index: neck_profile in c:\program files\easyphp1-8\www\insert_sql.php on line 21
Notice: Undefined index: neck_headstock_pitch in c:\program files\easyphp1-8\www\insert_sql.php on line 22
Notice: Undefined index: neck_thickness_1 in c:\program files\easyphp1-8\www\insert_sql.php on line 23
Notice: Undefined index: neck_thickness_12 in c:\program files\easyphp1-8\www\insert_sql.php on line 24
Notice: Undefined index: neck_heel_length in c:\program files\easyphp1-8\www\insert_sql.php on line 25
Notice: Undefined index: neck_joint in c:\program files\easyphp1-8\www\insert_sql.php on line 26
Notice: Undefined index: finger_specie in c:\program files\easyphp1-8\www\insert_sql.php on line 29
Notice: Undefined index: finger_total_length in c:\program files\easyphp1-8\www\insert_sql.php on line 30
Notice: Undefined index: finger_num_frets in c:\program files\easyphp1-8\www\insert_sql.php on line 31
Notice: Undefined index: finger_nut_width in c:\program files\easyphp1-8\www\insert_sql.php on line 32
Notice: Undefined index: finger_width_12 in c:\program files\easyphp1-8\www\insert_sql.php on line 33
Notice: Undefined index: finger_inlays in c:\program files\easyphp1-8\www\insert_sql.php on line 34
Notice: Undefined index: finger_binding in c:\program files\easyphp1-8\www\insert_sql.php on line 35
Notice: Undefined index: hard_plating_finish in c:\program files\easyphp1-8\www\insert_sql.php on line 38
Notice: Undefined index: hard_tailpiece in c:\program files\easyphp1-8\www\insert_sql.php on line 39
Notice: Undefined index: hard_bridge in c:\program files\easyphp1-8\www\insert_sql.php on line 40
Notice: Undefined index: hard_knobs in c:\program files\easyphp1-8\www\insert_sql.php on line 41
Notice: Undefined index: hard_tuners in c:\program files\easyphp1-8\www\insert_sql.php on line 42
all the names correspond to the variables of POST...
thx in advance for the help, c-ya 🙂