I need to make a Web page form to input the name (First, Last, MI), address (full), home Phone, work Phone, department, position and base salary. This is what I have come up with:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html xmlns= "http//www.w3.org/1999/xhtml" xml:lang:="en" lang="en">

<head>

     <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>

     <title>Production Department</title>

     <style type="text/css" title="text/css" media="all">

         label {font-weight: bold;

                 color:300ACC;}

     </style>

</head>

<body>

<!-- Script 1.1- form.html -->

<form action = "handle_form.php"

method= "post">

<fieldset><legend>Production Department:

      Enter correct information in the form below:</legend>

   <p><label>First name: <input type= "text" name="name" size="20"

   maxlength="15"/>  Last name: <input type= "text" name="name" size="20"

   maxlength="25"/>  Middle Initial(s): <input type= "text" name="name" size="7"

   maxlength="5"/></label></p>



  <p><label>Home address: <input type= "text" name="name" size="40"

   maxlength="70"/></label></p>

  <p><label>Mailing address (if different from home address):

   <input type= "text" name="name" size="40"

    maxlength="70"/></label></p>

  <p><label>City: <input type= "text" name="name" size="40"

    maxlength="60"/>   State:<input type= "text" name="name" size="25"

    maxlength="40"/> </label></p>

  <p><label>Zip code: <input type= "text" name="name" size="15"

    maxlength="11"/></label></p>



  <p><label>Home phone# (area code first): <input type= "text" name="name"

  size="20" maxlength="15"/>  Work phone# (area code first):

  <input type= "text" name="name" size="20" maxlength="15"/></label></p>



  <p><label>Department: <input type= "text" name="name"

  size="30" maxlength="40"/> Position: <input type= "text" name="name"

   size="30" maxlength="60"/></label></p>



  <p><label>Base Salary: <input type= "text" name="name"

  size="20" maxlength="15"/></label></p>

</fieldset> 

</form>

</body>

</html>

Do you need our help with anything? You haven't asked a question or indicated you're having a problem...

Ok! We have a form, what can we do with it ? :)

How do I take this information and design a database table in MySQL using phpMyAdmin?

i created a performer management system for a production company a while ago, heres an example of sending the form data to a mysql database.

this is a file called new_performer.php , if you take a look through the code you should be able to work out whats happening.

as for creating the database, here's a phpmyadmin tutorial
http://www.siteground.com/tutorials/phpmyadmin/phpmyadmin_create_database.htm

 <?php  

 //CHECK IF THE FORM HAS BEEN SUBMITTED
if(!empty($_POST['legalname'])  && !empty($_POST['dob'])   )  

{  

    $status       =  mysql_real_escape_string  ($_POST['status']);
    $legalname      =  mysql_real_escape_string  ($_POST['legalname']);
    $lmconfirmed       =  mysql_real_escape_string  ($_POST['lmconfirmed']);
    $performername      =  mysql_real_escape_string  ($_POST['performername']);
    $dob          =  mysql_real_escape_string  ($_POST['dob']);
    $birthplace     =  mysql_real_escape_string  ($_POST['birthplace']);
    $addressl1      =  mysql_real_escape_string  ($_POST['addressl1']);
    $city       =  mysql_real_escape_string  ($_POST['city']);
    $postcode       =  mysql_real_escape_string  ($_POST['postcode']);
    $region       =  mysql_real_escape_string  ($_POST['region']);
    $email      =  mysql_real_escape_string  ($_POST['email']);
    $phone      =  mysql_real_escape_string  ($_POST['phone']);
    $fee       =  mysql_real_escape_string  ($_POST['fee']);
    $ethnicity       =  mysql_real_escape_string  ($_POST['ethnicity']);
    $orientation      =  mysql_real_escape_string  ($_POST['orientation']);
    $height       =  mysql_real_escape_string  ($_POST['height']);
    $weight      =  mysql_real_escape_string  ($_POST['weight']);
    $waistsize          =  mysql_real_escape_string  ($_POST['waistsize']);
    $eyecolour     =  mysql_real_escape_string  ($_POST['eyecolour']);
    $birthmarks      =  mysql_real_escape_string  ($_POST['birthmarks']);
    $scars       =  mysql_real_escape_string  ($_POST['scars']);
    $tattoos       =  mysql_real_escape_string  ($_POST['tattoos']);
    $piercings       =  mysql_real_escape_string  ($_POST['piercings']);
    $haircolour      =  mysql_real_escape_string  ($_POST['haircolour']);
    $bodyhair      =  mysql_real_escape_string  ($_POST['bodyhair']);


    $role      =  mysql_real_escape_string  ($_POST['role']);
    $sexhealth      =  mysql_real_escape_string  ($_POST['sexhealth']);
    $notes      =  mysql_real_escape_string  ($_POST['notes']);

    //CHECKING IF THE MODEL DOB IS EQUAL TO BEING OVER 18 YEARS OLD
         $birthDate = $dob;

         $birthDate = explode("/", $birthDate);

         $age = (date("md", date("U", mktime(0, 0, 0, $birthDate[0], $birthDate[1], $birthDate[2]))) > date("md") ? ((date("Y")-$birthDate[2])-1):(date("Y")-$birthDate[2]));
         if ($age < 18) { echo  '<script type="text/javascript">
window.location = "new_performer.php?res=Performer_U18&re=Y"
</script>';  }
    else  
     {
   //MODEL IS OVER 18 , CHECKING IF THE PERFORMER NAME ALREADY EXISTS IN THE DB
     $checkusername = mysql_query("SELECT * FROM Model_Data WHERE Performer_Name = '".$performername."'");  


   //PERFORMER NAME DOESN'T EXIST SO PUTTING THE DATA IN THE BASE   
        $registerquery = mysql_query("INSERT INTO Model_Data ( Status, Legal_Name, LM_Confirmed, Performer_Name, DOB, Birth_Place, AddressL1, City, PostCode, Region, Email, Phone, Ethnicity, Orientation, Height, Weight, Waist_Size, Eye_Colour, Birth_Marks, Scars, Tattoos, Piercings, Hair_Colour, Body_Hair, Cock_Size, Cock_Cut, Role, Sex_Health, Model_Notes, Fee  ) VALUES ('".$status."', '".$legalname."', '".$lmconfirmed."',  '".$performername."', '".$dob."', '".$birthplace."', '".$addressl1."', '".$city."', '".$postcode."', '".$region."', '".$email."', '".$phone."', '".$ethnicity."', '".$orientation."', '".$height."', '".$weight."', '".$waistsize."', '".$eyecolour."', '".$birthmarks."', '".$scars."', '".$tattoos."', '".$piercings."', '".$haircolour."', '".$bodyhair."', '".$cocksize."', '".$cockcut."', '".$role."', '".$sexhealth."', '".$notes."', '".$fee."' )");   
       if($registerquery)  
        {  
         //TELLING THE USER WHAT HAPPENED, THE PERFORMER WAS ADDED

           echo '<script type="text/javascript">
window.location = "new_performer.php?res=Performer_Added&re=Y"
</script>';
        }  
        else  
        {  
        //TELLING THE USER WHAT HAPPENED, THERE WAS AN ERROR, THAT'S ALL I KNOW
            echo '<script type="text/javascript">
window.location = "new_performer.php?res=Performer_Error&re=Y"
</script>';  


     }  
}  }
else  
{  
    ?>  

  <div class="bigtext">
 <form method="post" action="new_performer.php" name="registerform" id="registerform">
  <table width="900px" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="400" height="40">Add Performer As:</td>
    <td width="500">Performer / Model Name</td>
    </tr>
  <tr>
    <td><select name="status" id="status" class="formb1">
      <option value="1">Pending Approval</option>
      <option value="2">Approved/Active</option>
      <option value="3">Rejected</option>
      <option value="4">Underage</option>
      <option value="5">Suspended/Inactive</option>
    </select></td>
    <td><input type="text" name="performername" id="performername" class="formb1" /></td>
  </tr>
</table>

  <br /><br />

 <table width="900px" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="400" height="40">Performer's Full Legal Name<span style="color:#F00">*</span></td>
    <td width="500">Verified Against ID?</td>
    </tr>
  <tr>
    <td><input type="text" name="legalname" id="legalname" class="formb1" /></td>
    <td><select name="lmconfirmed" id="lmconfirmed" class="formb1" style="width:100px;">
      <option value="1">Yes</option>
      <option value="2">No</option>
    </select></td>
  </tr>
</table> 
   <br /><br />
  <table width="400" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td width="400" height="40">Max Fee<span style="color:#F00"></span></td>
      </tr>
    <tr>
      <td><input type="text" name="fee" id="fee" class="formb1" /></td>
      </tr>
  </table>
  <br /><br />

 <table width="900px" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="400" height="40">Date Of Birth<span style="color:#F00">*</span></td>
    <td width="500">Birth Place</td>
    </tr>
  <tr>
    <td><input name="dob" type="text" class="formb1" id="dob" value="dd/mm/yyyy" /></td>
    <td><input type="text" name="birthplace" id="birthplace" class="formb1" /></td>
  </tr>
</table>   


 <div class="break"></div>


 <table width="800" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="400">Address Line 1</td>
    <td width="400" height="40">City</td>
    </tr>
  <tr>
    <td><input type="text" name="addressl1" id="addressl1" class="formb1" /></td>
    <td><input type="text" name="city" id="city" class="formb1" /></td>
    </tr>
</table>   

  <br /><br />

 <table width="800" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="400">Region</td>
    <td width="400" height="40">Postcode</td>
    </tr>
  <tr>
    <td><input type="text" name="region" id="region" class="formb1" /></td>
    <td><input type="text" name="postcode" id="postcode" class="formb1" style="width:100px;" /></td>
    </tr>
</table>   
  <br /><br />

 <table width="800" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="400">Email</td>
    <td width="400" height="40">Phone</td>
    </tr>
  <tr>
    <td><input type="text" name="email" id="email" class="formb1" /></td>
    <td><input type="text" name="phone" id="phone" class="formb1" /></td>
    </tr>
</table> 
 <div class="break"></div>

 <table width="800" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="400">Ethnicity</td>
    <td width="400" height="40">Orientation</td>
    </tr>
  <tr>
    <td><input type="text" name="ethnicity" id="ethnicity" class="formb1" /></td>
    <td><select name="orientation" id="orientation" class="formb1" style="width:200px;">
    <option value="" selected="selected">---</option>
      <option value="1">Homosexual</option>
      <option value="2">Bisexual</option>
      <option value="3">Heterosexual</option>
    </select></td>
    </tr>
</table>   
<br /><br />

 <table width="800" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="142">Height</td>
    <td height="40">Weight</td>
    <td height="40">Waist Size</td>
    <td height="40">Eye Colour</td>
    <td height="40">Hair Colour</td>
    </tr>
  <tr>
    <td><input type="text" name="height" id="height" class="formb1" style="width:100px;" /></td>
    <td width="153"><input type="text" name="weight" id="weight" class="formb1" style="width:100px;" /></td>
    <td width="151"><input type="text" name="waistsize" id="waistsize" class="formb1" style="width:100px;" /></td>
    <td width="170"><select name="eyecolour" id="eyecolour" class="formb1" style="width:100px;">
    <option value="" selected="selected">---</option>
      <option value="Blue">Blue</option>
      <option value="Brown">Brown</option>
      <option value="Green">Green</option>
      <option value="Hazel">Hazel</option>
      <option value="Other">Other</option>
    </select></td>
    <td width="184"><select name="haircolour" id="haircolour" class="formb1" style="width:100px;">
    <option value="" selected="selected">---</option>
      <option value="Blonde">Blonde</option>
      <option value="Brown">Brown</option>
      <option value="Black">Black</option>
      <option value="Ginger">Ginger</option>
      <option value="Other">Other</option>
    </select></td>
    </tr>
</table>   
<br /><br />
<table width="575" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="142">Body Hair</td>


    </tr>
  <tr>
    <td><select name="bodyhair" id="bodyhair" class="formb1" style="width:100px;">
    <option value="" selected="selected">---</option>
      <option value="None / Smooth">None / Smooth</option>
      <option value="Some / Little">Some / Little</option>
      <option value="Hairy">Hairy</option>
      <option value="Bear">Bear</option>
      <option value="Shaved">Shaved</option>
    </select></td>
    <td></td>
    <td width="153"></td>
    <td width="138"></td>
    </tr>
</table>   
<br /><br />
<table width="800" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="400">Birth Marks</td>
    <td width="400" height="40">Scars</td>
    </tr>
  <tr>
    <td><input type="text" name="birthmarks" id="birthmarks" class="formb1" /></td>
    <td><input type="text" name="scars" id="scars" class="formb1" /></td>
    </tr>
</table>   
<br /><br />
<table width="800" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="400">Tattoos</td>
    <td width="400" height="40">Piercings</td>
    </tr>
  <tr>
    <td><input type="text" name="tattoos" id="tattoos" class="formb1" /></td>
    <td><input type="text" name="piercings" id="piercings" class="formb1" /></td>
    </tr>
</table>   
<br /><br />
<table width="800" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height="40">Sexual Health</td>
    </tr>
  <tr>
    <td><input type="text" name="sexhealth" id="sexhealth" class="formb1" /></td>
    </tr>
</table>   
<br /><br />
<table width="800" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height="40">Performer Notes</td>
    </tr>
  <tr>
    <td><textarea name="notes" id="notes" cols="45" rows="5" class="formb2" ></textarea></td>
    </tr>
</table>  
<div class="break"></div>

<input type="submit" name="register"  value="Submit Performer" class="submitbtn" />
</form>
<?php } ?>






</div>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.