having trouble and gettin more confused about this code

  • buzzby365
  • Proficient
  • Proficient
  • buzzby365
  • Posts: 288

Post 3+ Months Ago

i have a site whereby you fill in a php form and it sends an auto responder. at another address i can view what has been put in the form because its stored on the internet. i have now made the form alot bigger and now i have run into trouble. here is the code: (the form itself is called getstartedform.php

Code: [ Select ]
<SCRIPT LANGUAGE="JavaScript">
<!--
function redirect () { setTimeout("go_now()",4000); }
function go_now ()  { window.location.href = "getstartedform.php"; }
//-->
</SCRIPT>
</head>

<?php

//extract($_REQUEST);
if ($_POST['submit'])
{
$user='';//these fields are filled but i took it out for posting this up
$host='';
$password='';
$database="";
$connection=mysql_connect($host,$user,$password) or die ("could not connect to server");
$db=mysql_select_db($database,$connection);
$sql = "insert into getstarted(name, email, contactAddress, mobile, workHomeTel, contactPostcode, projectPostcode, projectGarden, projectLoft, projectRefit, projectXtension, shopUse, officeUse, homeUse, otherUses, engineer, partywall, projectManager, design, lifestyle, strucural, planning, buildingRegs, otherHelp, wheelchair, partialEyesight, terraced, familyChildren, semiDetached, aged, allergy, detached, other, otherNeeds, needsRefurbishment, needsExtraSpace, needsExtraLight, contemporaryDesignstyle, traditionalDesignstyle, mixedDesignstyle, progTimeComplete1month, progTimeComplete6months, progTimeComplete9months, budgetCost3kto14k, budgetCost15kto45k, budgetCostOver45k, importantThanCostYes, importantThanCostNo, importantThanCostMaybe, importantThanProgYes, importantThanProgNo, importantThanProgMaybe, importantThanDesYes, importantThanDesNo, importantThanDesMaybe, build2rent, build2sell, build2keep, otherBuildingNotes) values ('{$_POST['name']}','{$_POST['email']}','{$_POST['contact_address']}','{$_POST['mobile']}','{$_POST['workhome_tel']}','{$_POST['contact_postcode']}','{$_POST['project_postcode']}','{$_POST['project_garden']}','{$_POST['project_loft']}','{$_POST['project_refit']}','{$_POST['project_extension']}','{$_POST['use_shop']}','{$_POST['use_office']}','{$_POST['use_home']}','{$_POST['use_other']}','{$_POST['engineer']}','{$_POST['partywall']}','{$_POST['projectmanager']}','{$_POST['design']}','{$_POST['lifestyle']}','{$_POST['strucural']}','{$_POST['planning']}','{$_POST['buildingregs']}','{$_POST['otherhelp']}','{$_POST['wheelchair']}','{$_POST['partialeyesight']}','{$_POST['terraced']}','{$_POST['familychildren']}','{$_POST['semidetached']}','{$_POST['aged']}','{$_POST['allergy']}','{$_POST['detached']}','{$_POST['other']}','{$_POST['otherneeds']}','{$_POST['needrefurb']}','{$_POST['need_xspace']}','{$_POST['need_xlight']}','{$_POST['designstyle_contemporary']}','{$_POST['designstyle_traditional']}','{$_POST['designstyle_mixed']}','{$_POST['programtimecompletion_1m']}','{$_POST['programtimecompletion_6m']}','{$_POST['programtimecompletion_9m']}','{$_POST['budgetcost_3kto14k']}','{$_POST['budgetcost_15kto45k']}','{$_POST['budgetcost_over45k']}','{$_POST['importantthancost_yes']}','{$_POST['importantthancost_no']}','{$_POST['importantthancost_maybe']}','{$_POST['importantthanprogram_yes']}','{$_POST['importantthanprogram_no']}','{$_POST['importantthanprogram_maybe']}','{$_POST['importantthandesign_yes']}','{$_POST['importantthandesign_no']}','{$_POST['importantthandesign_maybe']}','{$_POST['whybuild_rent']}','{$_POST['whybuild_sell']}','{$_POST['whybuild_keep']}','{$_POST['otherbuildingnotes']}')";
$result = mysql_query($sql) or print(mysql_error());
//mail($to, $subject, $msg, $additional_headers);
mail($_POST['email'],'hello there','Hello '.$_POST['name'].', thank you for filling out the form ', "From: athompson@building-doctors.com");
echo "<table border=1 cellpadding=2 cellspacing=2 ><tr><td>";
echo 'Hello '.$_POST['name'].', thank you for filling out the form ';
echo "</tr></td></table>";
echo "<body onLoad=redirect() text=#000000 link=#00FFFF vlink=#C0C0C0>";
}
else
{
?>
  1. <SCRIPT LANGUAGE="JavaScript">
  2. <!--
  3. function redirect () { setTimeout("go_now()",4000); }
  4. function go_now ()  { window.location.href = "getstartedform.php"; }
  5. //-->
  6. </SCRIPT>
  7. </head>
  8. <?php
  9. //extract($_REQUEST);
  10. if ($_POST['submit'])
  11. {
  12. $user='';//these fields are filled but i took it out for posting this up
  13. $host='';
  14. $password='';
  15. $database="";
  16. $connection=mysql_connect($host,$user,$password) or die ("could not connect to server");
  17. $db=mysql_select_db($database,$connection);
  18. $sql = "insert into getstarted(name, email, contactAddress, mobile, workHomeTel, contactPostcode, projectPostcode, projectGarden, projectLoft, projectRefit, projectXtension, shopUse, officeUse, homeUse, otherUses, engineer, partywall, projectManager, design, lifestyle, strucural, planning, buildingRegs, otherHelp, wheelchair, partialEyesight, terraced, familyChildren, semiDetached, aged, allergy, detached, other, otherNeeds, needsRefurbishment, needsExtraSpace, needsExtraLight, contemporaryDesignstyle, traditionalDesignstyle, mixedDesignstyle, progTimeComplete1month, progTimeComplete6months, progTimeComplete9months, budgetCost3kto14k, budgetCost15kto45k, budgetCostOver45k, importantThanCostYes, importantThanCostNo, importantThanCostMaybe, importantThanProgYes, importantThanProgNo, importantThanProgMaybe, importantThanDesYes, importantThanDesNo, importantThanDesMaybe, build2rent, build2sell, build2keep, otherBuildingNotes) values ('{$_POST['name']}','{$_POST['email']}','{$_POST['contact_address']}','{$_POST['mobile']}','{$_POST['workhome_tel']}','{$_POST['contact_postcode']}','{$_POST['project_postcode']}','{$_POST['project_garden']}','{$_POST['project_loft']}','{$_POST['project_refit']}','{$_POST['project_extension']}','{$_POST['use_shop']}','{$_POST['use_office']}','{$_POST['use_home']}','{$_POST['use_other']}','{$_POST['engineer']}','{$_POST['partywall']}','{$_POST['projectmanager']}','{$_POST['design']}','{$_POST['lifestyle']}','{$_POST['strucural']}','{$_POST['planning']}','{$_POST['buildingregs']}','{$_POST['otherhelp']}','{$_POST['wheelchair']}','{$_POST['partialeyesight']}','{$_POST['terraced']}','{$_POST['familychildren']}','{$_POST['semidetached']}','{$_POST['aged']}','{$_POST['allergy']}','{$_POST['detached']}','{$_POST['other']}','{$_POST['otherneeds']}','{$_POST['needrefurb']}','{$_POST['need_xspace']}','{$_POST['need_xlight']}','{$_POST['designstyle_contemporary']}','{$_POST['designstyle_traditional']}','{$_POST['designstyle_mixed']}','{$_POST['programtimecompletion_1m']}','{$_POST['programtimecompletion_6m']}','{$_POST['programtimecompletion_9m']}','{$_POST['budgetcost_3kto14k']}','{$_POST['budgetcost_15kto45k']}','{$_POST['budgetcost_over45k']}','{$_POST['importantthancost_yes']}','{$_POST['importantthancost_no']}','{$_POST['importantthancost_maybe']}','{$_POST['importantthanprogram_yes']}','{$_POST['importantthanprogram_no']}','{$_POST['importantthanprogram_maybe']}','{$_POST['importantthandesign_yes']}','{$_POST['importantthandesign_no']}','{$_POST['importantthandesign_maybe']}','{$_POST['whybuild_rent']}','{$_POST['whybuild_sell']}','{$_POST['whybuild_keep']}','{$_POST['otherbuildingnotes']}')";
  19. $result = mysql_query($sql) or print(mysql_error());
  20. //mail($to, $subject, $msg, $additional_headers);
  21. mail($_POST['email'],'hello there','Hello '.$_POST['name'].', thank you for filling out the form ', "From: athompson@building-doctors.com");
  22. echo "<table border=1 cellpadding=2 cellspacing=2 ><tr><td>";
  23. echo 'Hello '.$_POST['name'].', thank you for filling out the form ';
  24. echo "</tr></td></table>";
  25. echo "<body onLoad=redirect() text=#000000 link=#00FFFF vlink=#C0C0C0>";
  26. }
  27. else
  28. {
  29. ?>


here is the form

Code: [ Select ]
<form method="POST" action="getstartedform.php" onsubmit="return formCheck(this)">
<tr bgcolor="#F4FFF4">
      <td width="195">name:<br /> <input type="text" name="name" class="textstyle" /></td>
      <td width="205">email: <br /> <input type="text" name="email" class="textstyle"/></td>
     </tr>
     <tr bgcolor="#F4FFF4">
      <td rowspan="2">contact address:
       <textarea name="contact_address" cols="25" rows="2" id="contact_address"></textarea></td>
      <td>mobile:<br /> <input name="mobile" type="text" class="textstyle" id="mobile"/></td>
     </tr>
     <tr>
      <td bgcolor="#F4FFF4">work/home tel:
       <input name="workhome_tel" type="text" class="textstyle" id="workhome_tel"/></td>
     </tr>
     <tr bgcolor="#F4FFF4">
      <td>contact postcode:<br /> <input name="contact_postcode" type="text" class="textstyle" id="contact_postcode" /></td>
      <td>project postcode: <br />
       <input name="project_pcode" type="text" class="textstyle" id="project_pcode"/>
      </td>
     </tr>
     <tr>
      <td colspan="2"><table width="400" border="1" cellpadding="0" cellspacing="0" bordercolor="#FFFFFF" class="textstyle">
        <tr bgcolor="#C7E2C0">
         <td width="89"><div align="center"></div></td>
         <td width="91"><div align="center">garden</div></td>
         <td width="64"><div align="center">loft</div></td>
         <td width="76"><div align="center">refit</div></td>
         <td width="80"><div align="center">extension</div></td>
        </tr>
        <tr bgcolor="#FBFFFB">
         <td height="15" align="center">project</td>
         <td><div align="center">
           <input name="project_garden" type="checkbox" class="textstyle" id="project_garden" value="1"/>
          </div></td>
         <td><div align="center">
           <input name="project_loft" type="checkbox" class="textstyle" id="project_loft" value="1"/>
          </div></td>
         <td><div align="center">
           <input name="project_refit" type="checkbox" class="textstyle" id="project_refit" value="1"/>
          </div></td>
         <td><div align="center">
           <input name="project_extension" type="checkbox" class="textstyle" id="project_extension" value="1"/>
          </div></td>
        </tr>
        <tr bgcolor="#C7E2C0">
         <td align="center"><div align="center"></div></td>
         <td><div align="center">shop</div></td>
         <td><div align="center">office</div></td>
         <td><div align="center">home</div></td>
         <td><div align="center">other</div></td>
        </tr>
        <tr bgcolor="#FBFFFB">
         <td align="center">use</td>
         <td><div align="center">
           <input name="use_shop" type="checkbox" class="textstyle" id="use_shop" value="1"/>
          </div></td>
         <td><div align="center">
           <input name="use_office" type="checkbox" class="textstyle" id="use_office" value="1"/>
          </div></td>
         <td><div align="center">
           <input name="use_home" type="checkbox" class="textstyle" id="use_home" value="1"/>
          </div></td>
         <td><div align="center">
           <input name="use_other" type="checkbox" class="textstyle" id="use_other" value="1"/>
          </div></td>
        </tr>
       </table></td>
     </tr>
    </table>
    <table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="#F5F5F5" class="textstyle">
     <tr>
      <td colspan="2" bgcolor="#305A36" class="boldtext"><div align="center" class="stylewht">type of help
        required</div></td>
      <td colspan="2" bgcolor="#305A36" class="boldtext"><div align="center" class="stylewht">special needs</div></td>
     </tr>
     <tr bgcolor="#F4FFF4">
      <td width="24%" bordercolor="#FFFFFF"><div align="right">engineer</div></td>
      <td width="25%" bordercolor="#FFFFFF" bgcolor="#F4FFF4"><input name="engineer" type="checkbox" class="textstyle" id="engineer" value="1"/></td>
      <td width="32%" bordercolor="#FFFFFF"><div align="right">Wheelchair ecology</div></td>
      <td width="19%" bordercolor="#FFFFFF"><input name="wheelchair" type="checkbox" class="textstyle" id="wheelchair" value="1"/></td>
     </tr>
     <tr bgcolor="#F4FFF4">
      <td bordercolor="#FFFFFF"><div align="right">party wall</div></td>
      <td bordercolor="#FFFFFF"><input name="partywall" type="checkbox" class="textstyle" id="partywall" value="1"/></td>
      <td bordercolor="#FFFFFF"><div align="right">Partial eyesight</div></td>
      <td bordercolor="#FFFFFF"><input name="partialeyesight" type="checkbox" class="textstyle" id="partialeyesight" value="1"/></td>
     </tr>
     <tr bgcolor="#F4FFF4">
      <td bordercolor="#FFFFFF"><div align="right">architect</div></td>
      <td bordercolor="#FFFFFF"><input name="architect" type="checkbox" class="textstyle" id="architect" value="1"/></td>
      <td bordercolor="#FFFFFF"><div align="right">terraced</div></td>
      <td bordercolor="#FFFFFF"><input name="terraced" type="checkbox" class="textstyle" id="terraced" value="1"/></td>
     </tr>
     <tr bgcolor="#F4FFF4">
      <td bordercolor="#FFFFFF"><div align="right">project manager</div></td>
      <td bordercolor="#FFFFFF"><input name="projectmanager" type="checkbox" class="textstyle" id="projectmanager" value="1"/></td>
      <td bordercolor="#FFFFFF"><div align="right">family &amp; <br />
        children</div></td>
      <td bordercolor="#FFFFFF"><input name="familychildren" type="checkbox" class="textstyle" id="familychildren" value="1"/></td>
     </tr>
     <tr bgcolor="#F4FFF4">
      <td bordercolor="#FFFFFF"><div align="right">design</div></td>
      <td bordercolor="#FFFFFF"><input name="design" type="checkbox" class="textstyle" id="design" value="1"/></td>
      <td bordercolor="#FFFFFF"><div align="right">semi-detached</div></td>
      <td bordercolor="#FFFFFF"><input name="semidetached" type="checkbox" class="textstyle" id="semidetached" value="1"/></td>
     </tr>
     <tr bgcolor="#F4FFF4">
      <td bordercolor="#FFFFFF"><div align="right">lifestyle</div></td>
      <td bordercolor="#FFFFFF"><input name="lifestyle" type="checkbox" class="textstyle" id="lifestyle" value="1"/></td>
      <td bordercolor="#FFFFFF"><div align="right">aged</div></td>
      <td bordercolor="#FFFFFF"><input name="aged" type="checkbox" class="textstyle" id="aged" value="1"/></td>
     </tr>
     <tr bgcolor="#F4FFF4">
      <td bordercolor="#FFFFFF"><div align="right">structural</div></td>
      <td bordercolor="#FFFFFF"><input name="structural" type="checkbox" class="textstyle" id="structural" value="1"/></td>
      <td bordercolor="#FFFFFF"><div align="right">allergy</div></td>
      <td bordercolor="#FFFFFF"><input name="allergy" type="checkbox" class="textstyle" id="allergy" value="1"/></td>
     </tr>
     <tr bgcolor="#F4FFF4">
      <td bordercolor="#FFFFFF"><div align="right">planning</div></td>
      <td bordercolor="#FFFFFF"><input name="planning" type="checkbox" class="textstyle" id="planning" value="1"/></td>
      <td bordercolor="#FFFFFF"><div align="right">detached</div></td>
      <td bordercolor="#FFFFFF"><input name="detached" type="checkbox" class="textstyle" id="detached" value="1"/></td>
     </tr>
     <tr bgcolor="#F4FFF4">
      <td bordercolor="#FFFFFF"><div align="right">building regs</div></td>
      <td bordercolor="#FFFFFF"><input name="buildingregs" type="checkbox" class="textstyle" id="buildingregs" value="1"/></td>
      <td bordercolor="#FFFFFF"><div align="right">other</div></td>
      <td bordercolor="#FFFFFF"><input name="other" type="checkbox" class="textstyle" id="other" value="1"/></td>
     </tr>
     <tr bgcolor="#F4FFF4">
      <td colspan="2" bordercolor="#FFFFFF"><div align="left">other
        <input name="otherhelp" type="text" class="textstyle" id="otherhelp" size="20"/>
       </div></td>
      <td colspan="2" bordercolor="#FFFFFF"><div align="right">please specify
        <input name="otherneeds" type="text" class="textstyle" id="otherneeds" size="20"/>
       </div></td>
     </tr>
    </table>
    <table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="#F5F5F5" class="textstyle">
     <tr bgcolor="#305A36">
      <td colspan="5" class="boldtext"><div align="center" class="stylewht">Customer
        Preferences</div></td>
     </tr>
     <tr>
      <td width="1%">&nbsp;</td>
      <td width="17%" bordercolor="#FFFFFF" bgcolor="#C7E2C0">&nbsp;</td>
      <td width="26%" bordercolor="#FFFFFF" bgcolor="#C7E2C0"><div align="center">refurb</div></td>
      <td width="36%" bordercolor="#FFFFFF" bgcolor="#C7E2C0"><div align="center">extra
        space</div></td>
      <td width="20%" bordercolor="#FFFFFF" bgcolor="#C7E2C0"><div align="center">extra
        light</div></td>
     </tr>
     <tr>
      <td>&nbsp;</td>
      <td align="center" valign="middle" bordercolor="#FFFFFF" bgcolor="#F2FFF2"><div align="right">Do
        you need...</div></td>
      <td bordercolor="#FFFFFF" bgcolor="#F2FFF2"><div align="center">
        <input type="radio" name="need_refurb" value="1" />
       </div></td>
      <td bordercolor="#FFFFFF" bgcolor="#F2FFF2"><div align="center">
        <input type="radio" name="need_xspace" value="1" />
       </div></td>
      <td bordercolor="#FFFFFF" bgcolor="#F2FFF2"><div align="center">
        <input type="radio" name="need_xlight" value="1" />
       </div></td>
     </tr>
     <tr>
      <td>&nbsp;</td>
      <td bordercolor="#FFFFFF" bgcolor="#C7E2C0"><div align="right"></div></td>
      <td bordercolor="#FFFFFF" bgcolor="#C7E2C0"><div align="center">contemporary</div></td>
      <td bordercolor="#FFFFFF" bgcolor="#C7E2C0"><div align="center">traditional</div></td>
      <td bordercolor="#FFFFFF" bgcolor="#C7E2C0"><div align="center">mixed</div></td>
     </tr>
     <tr>
      <td>&nbsp;</td>
      <td bordercolor="#FFFFFF" bgcolor="#FBFFFB"><div align="right">Design
        style</div></td>
      <td bordercolor="#FFFFFF" bgcolor="#FBFFFB"><div align="center">
        <input type="radio" name="designstyle_contemporary" value="1" />
       </div></td>
      <td bordercolor="#FFFFFF" bgcolor="#FBFFFB"><div align="center">
        <input type="radio" name="designstyle_traditional" value="1" />
       </div></td>
      <td bordercolor="#FFFFFF" bgcolor="#FBFFFB"><div align="center">
        <input type="radio" name="designstyle_mixed" value="1" />
       </div></td>
     </tr>
     <tr>
      <td>&nbsp;</td>
      <td bordercolor="#FFFFFF" bgcolor="#C7E2C0"><div align="right"></div></td>
      <td bordercolor="#FFFFFF" bgcolor="#C7E2C0"><div align="center">1
        month</div></td>
      <td bordercolor="#FFFFFF" bgcolor="#C7E2C0"><div align="center">6
        months</div></td>
      <td bordercolor="#FFFFFF" bgcolor="#C7E2C0"><div align="center">9
        months</div></td>
     </tr>
     <tr>
      <td>&nbsp;</td>
      <td bordercolor="#FFFFFF" bgcolor="#F2FFF2"><div align="right">program
        time completion</div></td>
      <td bordercolor="#FFFFFF" bgcolor="#F2FFF2"><div align="center">
        <input type="radio" name="programtimecompletion_1m" value="1" />
       </div></td>
      <td bordercolor="#FFFFFF" bgcolor="#F2FFF2"><div align="center">
        <input type="radio" name="programtimecompletion_6m" value="1" />
       </div></td>
      <td bordercolor="#FFFFFF" bgcolor="#F2FFF2"><div align="center">
        <input type="radio" name="programtimecompletion_9m" value="1" />
       </div></td>
     </tr>
     <tr>
      <td>&nbsp;</td>
      <td bordercolor="#FFFFFF" bgcolor="#C7E2C0"><div align="right"></div></td>
      <td bordercolor="#FFFFFF" bgcolor="#C7E2C0">3000k - 14999k</td>
      <td bordercolor="#FFFFFF" bgcolor="#C7E2C0"><div align="center">15000k
        - 45000k</div></td>
      <td bordercolor="#FFFFFF" bgcolor="#C7E2C0">&nbsp; &gt; 45000k</td>
     </tr>
     <tr>
      <td>&nbsp;</td>
      <td bordercolor="#FFFFFF" bgcolor="#FBFFFB"><div align="right">budget
        cost</div></td>
      <td bordercolor="#FFFFFF" bgcolor="#FBFFFB"><div align="center">
        <input type="radio" name="budgetcost_3k-15k" value="1" />
       </div></td>
      <td bordercolor="#FFFFFF" bgcolor="#FBFFFB"><div align="center">
        <input type="radio" name="budgetcost_15k-45k" value="1" />
       </div></td>
      <td bordercolor="#FFFFFF" bgcolor="#FBFFFB"><div align="center">
        <input type="radio" name="budgetcost_over45k" value="1" />
       </div></td>
     </tr>
     <tr>
      <td>&nbsp;</td>
      <td bordercolor="#FFFFFF" bgcolor="#C7E2C0"><div align="right"></div></td>
      <td bordercolor="#FFFFFF" bgcolor="#C7E2C0"><div align="center">yes</div></td>
      <td bordercolor="#FFFFFF" bgcolor="#C7E2C0"><div align="center">no</div></td>
      <td bordercolor="#FFFFFF" bgcolor="#C7E2C0"><div align="center">maybe</div></td>
     </tr>
     <tr>
      <td>&nbsp;</td>
      <td bordercolor="#FFFFFF" bgcolor="#F2FFF2"><div align="right">is
        program<br />
        more important than cost</div></td>
      <td bordercolor="#FFFFFF" bgcolor="#E9EFE4"><div align="center">
        <input type="radio" name="imortantthancost_yes" value="1" />
       </div></td>
      <td bordercolor="#FFFFFF" bgcolor="#E9EFE4"><div align="center">
        <input type="radio" name="imortantthancost_no" value="1" />
       </div></td>
      <td bordercolor="#FFFFFF" bgcolor="#E9EFE4"><div align="center">
        <input type="radio" name="imortantthancost_maybe" value="1" />
       </div></td>
     </tr>
     <tr>
      <td>&nbsp;</td>
      <td bordercolor="#FFFFFF" bgcolor="#FBFFFB"><div align="right">is
        design more important than program<br />
       </div></td>
      <td bordercolor="#FFFFFF" bgcolor="#E9EFE4"><div align="center">
        <input type="radio" name="imortantthanprogram_yes" value="1" />
       </div></td>
      <td bordercolor="#FFFFFF" bgcolor="#E9EFE4"><div align="center">
        <input type="radio" name="imortantthanprogram_no" value="1" />
       </div></td>
      <td bordercolor="#FFFFFF" bgcolor="#E9EFE4"><div align="center">
        <input type="radio" name="imortantthanprogram_maybe" value="1" />
       </div></td>
     </tr>
     <tr>
      <td>&nbsp;</td>
      <td bordercolor="#FFFFFF" bgcolor="#F2FFF2"><div align="right">is
        cost more important than design<br />
       </div></td>
      <td bordercolor="#FFFFFF" bgcolor="#E9EFE4"><div align="center">
        <input type="radio" name="imortantthandesign_yes" value="1" />
       </div></td>
      <td bordercolor="#FFFFFF" bgcolor="#E9EFE4"><div align="center">
        <input type="radio" name="imortantthandesign_no" value="1" />
       </div></td>
      <td bordercolor="#FFFFFF" bgcolor="#E9EFE4"><div align="center">
        <input type="radio" name="imortantthandesign_maybe" value="1" />
       </div></td>
     </tr>
     <tr>
      <td>&nbsp;</td>
      <td bordercolor="#FFFFFF" bgcolor="#C7E2C0"><div align="right"></div></td>
      <td bordercolor="#FFFFFF" bgcolor="#C7E2C0"><div align="center">to
        rent</div></td>
      <td bordercolor="#FFFFFF" bgcolor="#C7E2C0"><div align="center">to
        sell</div></td>
      <td bordercolor="#FFFFFF" bgcolor="#C7E2C0"><div align="center">to
        keep</div></td>
     </tr>
     <tr>
      <td>&nbsp;</td>
      <td align="left" bordercolor="#FFFFFF" bgcolor="#FBFFFB"><div align="right">Why
        are you building<br />
       </div></td>
      <td bordercolor="#FFFFFF" bgcolor="#FBFFFB"><div align="center">
        <input type="radio" name="whybuild_rent" value="1" />
       </div></td>
      <td bordercolor="#FFFFFF" bgcolor="#FBFFFB"><div align="center">
        <input type="radio" name="whybuild_sell" value="1" />
       </div></td>
      <td bordercolor="#FFFFFF" bgcolor="#FBFFFB"><div align="center">
        <input type="radio" name="whybuild_keep" value="1" />
       </div></td>
     </tr>
     <tr>
      <td>&nbsp;</td>
      <td align="right" bordercolor="#FFFFFF" bgcolor="#F4FFF4">any other
       notes</td>
      <td colspan="2" bordercolor="#FFFFFF" bgcolor="#F4FFF4"><textarea name="otherbuildingnotes" cols="30" rows="2" class="textstyle" id="otherbuildingnotes"></textarea></td>
      <td bordercolor="#FFFFFF" bgcolor="#F4FFF4">&nbsp;</td>
     </tr>
     <tr>
      <td>&nbsp;</td>
      <td colspan="2"><div align="right">
        <input type="submit" name="Submit" value="Submit" class="textstyle"/>
       </div></td>
      <td colspan="2"><input type="reset" name="reset" value="Reset" class="textstyle"/></td>
     </tr>
    </table>
   </form></td>
 </tr>
</table>

<?
}
?>
</html>
  1. <form method="POST" action="getstartedform.php" onsubmit="return formCheck(this)">
  2. <tr bgcolor="#F4FFF4">
  3.       <td width="195">name:<br /> <input type="text" name="name" class="textstyle" /></td>
  4.       <td width="205">email: <br /> <input type="text" name="email" class="textstyle"/></td>
  5.      </tr>
  6.      <tr bgcolor="#F4FFF4">
  7.       <td rowspan="2">contact address:
  8.        <textarea name="contact_address" cols="25" rows="2" id="contact_address"></textarea></td>
  9.       <td>mobile:<br /> <input name="mobile" type="text" class="textstyle" id="mobile"/></td>
  10.      </tr>
  11.      <tr>
  12.       <td bgcolor="#F4FFF4">work/home tel:
  13.        <input name="workhome_tel" type="text" class="textstyle" id="workhome_tel"/></td>
  14.      </tr>
  15.      <tr bgcolor="#F4FFF4">
  16.       <td>contact postcode:<br /> <input name="contact_postcode" type="text" class="textstyle" id="contact_postcode" /></td>
  17.       <td>project postcode: <br />
  18.        <input name="project_pcode" type="text" class="textstyle" id="project_pcode"/>
  19.       </td>
  20.      </tr>
  21.      <tr>
  22.       <td colspan="2"><table width="400" border="1" cellpadding="0" cellspacing="0" bordercolor="#FFFFFF" class="textstyle">
  23.         <tr bgcolor="#C7E2C0">
  24.          <td width="89"><div align="center"></div></td>
  25.          <td width="91"><div align="center">garden</div></td>
  26.          <td width="64"><div align="center">loft</div></td>
  27.          <td width="76"><div align="center">refit</div></td>
  28.          <td width="80"><div align="center">extension</div></td>
  29.         </tr>
  30.         <tr bgcolor="#FBFFFB">
  31.          <td height="15" align="center">project</td>
  32.          <td><div align="center">
  33.            <input name="project_garden" type="checkbox" class="textstyle" id="project_garden" value="1"/>
  34.           </div></td>
  35.          <td><div align="center">
  36.            <input name="project_loft" type="checkbox" class="textstyle" id="project_loft" value="1"/>
  37.           </div></td>
  38.          <td><div align="center">
  39.            <input name="project_refit" type="checkbox" class="textstyle" id="project_refit" value="1"/>
  40.           </div></td>
  41.          <td><div align="center">
  42.            <input name="project_extension" type="checkbox" class="textstyle" id="project_extension" value="1"/>
  43.           </div></td>
  44.         </tr>
  45.         <tr bgcolor="#C7E2C0">
  46.          <td align="center"><div align="center"></div></td>
  47.          <td><div align="center">shop</div></td>
  48.          <td><div align="center">office</div></td>
  49.          <td><div align="center">home</div></td>
  50.          <td><div align="center">other</div></td>
  51.         </tr>
  52.         <tr bgcolor="#FBFFFB">
  53.          <td align="center">use</td>
  54.          <td><div align="center">
  55.            <input name="use_shop" type="checkbox" class="textstyle" id="use_shop" value="1"/>
  56.           </div></td>
  57.          <td><div align="center">
  58.            <input name="use_office" type="checkbox" class="textstyle" id="use_office" value="1"/>
  59.           </div></td>
  60.          <td><div align="center">
  61.            <input name="use_home" type="checkbox" class="textstyle" id="use_home" value="1"/>
  62.           </div></td>
  63.          <td><div align="center">
  64.            <input name="use_other" type="checkbox" class="textstyle" id="use_other" value="1"/>
  65.           </div></td>
  66.         </tr>
  67.        </table></td>
  68.      </tr>
  69.     </table>
  70.     <table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="#F5F5F5" class="textstyle">
  71.      <tr>
  72.       <td colspan="2" bgcolor="#305A36" class="boldtext"><div align="center" class="stylewht">type of help
  73.         required</div></td>
  74.       <td colspan="2" bgcolor="#305A36" class="boldtext"><div align="center" class="stylewht">special needs</div></td>
  75.      </tr>
  76.      <tr bgcolor="#F4FFF4">
  77.       <td width="24%" bordercolor="#FFFFFF"><div align="right">engineer</div></td>
  78.       <td width="25%" bordercolor="#FFFFFF" bgcolor="#F4FFF4"><input name="engineer" type="checkbox" class="textstyle" id="engineer" value="1"/></td>
  79.       <td width="32%" bordercolor="#FFFFFF"><div align="right">Wheelchair ecology</div></td>
  80.       <td width="19%" bordercolor="#FFFFFF"><input name="wheelchair" type="checkbox" class="textstyle" id="wheelchair" value="1"/></td>
  81.      </tr>
  82.      <tr bgcolor="#F4FFF4">
  83.       <td bordercolor="#FFFFFF"><div align="right">party wall</div></td>
  84.       <td bordercolor="#FFFFFF"><input name="partywall" type="checkbox" class="textstyle" id="partywall" value="1"/></td>
  85.       <td bordercolor="#FFFFFF"><div align="right">Partial eyesight</div></td>
  86.       <td bordercolor="#FFFFFF"><input name="partialeyesight" type="checkbox" class="textstyle" id="partialeyesight" value="1"/></td>
  87.      </tr>
  88.      <tr bgcolor="#F4FFF4">
  89.       <td bordercolor="#FFFFFF"><div align="right">architect</div></td>
  90.       <td bordercolor="#FFFFFF"><input name="architect" type="checkbox" class="textstyle" id="architect" value="1"/></td>
  91.       <td bordercolor="#FFFFFF"><div align="right">terraced</div></td>
  92.       <td bordercolor="#FFFFFF"><input name="terraced" type="checkbox" class="textstyle" id="terraced" value="1"/></td>
  93.      </tr>
  94.      <tr bgcolor="#F4FFF4">
  95.       <td bordercolor="#FFFFFF"><div align="right">project manager</div></td>
  96.       <td bordercolor="#FFFFFF"><input name="projectmanager" type="checkbox" class="textstyle" id="projectmanager" value="1"/></td>
  97.       <td bordercolor="#FFFFFF"><div align="right">family &amp; <br />
  98.         children</div></td>
  99.       <td bordercolor="#FFFFFF"><input name="familychildren" type="checkbox" class="textstyle" id="familychildren" value="1"/></td>
  100.      </tr>
  101.      <tr bgcolor="#F4FFF4">
  102.       <td bordercolor="#FFFFFF"><div align="right">design</div></td>
  103.       <td bordercolor="#FFFFFF"><input name="design" type="checkbox" class="textstyle" id="design" value="1"/></td>
  104.       <td bordercolor="#FFFFFF"><div align="right">semi-detached</div></td>
  105.       <td bordercolor="#FFFFFF"><input name="semidetached" type="checkbox" class="textstyle" id="semidetached" value="1"/></td>
  106.      </tr>
  107.      <tr bgcolor="#F4FFF4">
  108.       <td bordercolor="#FFFFFF"><div align="right">lifestyle</div></td>
  109.       <td bordercolor="#FFFFFF"><input name="lifestyle" type="checkbox" class="textstyle" id="lifestyle" value="1"/></td>
  110.       <td bordercolor="#FFFFFF"><div align="right">aged</div></td>
  111.       <td bordercolor="#FFFFFF"><input name="aged" type="checkbox" class="textstyle" id="aged" value="1"/></td>
  112.      </tr>
  113.      <tr bgcolor="#F4FFF4">
  114.       <td bordercolor="#FFFFFF"><div align="right">structural</div></td>
  115.       <td bordercolor="#FFFFFF"><input name="structural" type="checkbox" class="textstyle" id="structural" value="1"/></td>
  116.       <td bordercolor="#FFFFFF"><div align="right">allergy</div></td>
  117.       <td bordercolor="#FFFFFF"><input name="allergy" type="checkbox" class="textstyle" id="allergy" value="1"/></td>
  118.      </tr>
  119.      <tr bgcolor="#F4FFF4">
  120.       <td bordercolor="#FFFFFF"><div align="right">planning</div></td>
  121.       <td bordercolor="#FFFFFF"><input name="planning" type="checkbox" class="textstyle" id="planning" value="1"/></td>
  122.       <td bordercolor="#FFFFFF"><div align="right">detached</div></td>
  123.       <td bordercolor="#FFFFFF"><input name="detached" type="checkbox" class="textstyle" id="detached" value="1"/></td>
  124.      </tr>
  125.      <tr bgcolor="#F4FFF4">
  126.       <td bordercolor="#FFFFFF"><div align="right">building regs</div></td>
  127.       <td bordercolor="#FFFFFF"><input name="buildingregs" type="checkbox" class="textstyle" id="buildingregs" value="1"/></td>
  128.       <td bordercolor="#FFFFFF"><div align="right">other</div></td>
  129.       <td bordercolor="#FFFFFF"><input name="other" type="checkbox" class="textstyle" id="other" value="1"/></td>
  130.      </tr>
  131.      <tr bgcolor="#F4FFF4">
  132.       <td colspan="2" bordercolor="#FFFFFF"><div align="left">other
  133.         <input name="otherhelp" type="text" class="textstyle" id="otherhelp" size="20"/>
  134.        </div></td>
  135.       <td colspan="2" bordercolor="#FFFFFF"><div align="right">please specify
  136.         <input name="otherneeds" type="text" class="textstyle" id="otherneeds" size="20"/>
  137.        </div></td>
  138.      </tr>
  139.     </table>
  140.     <table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="#F5F5F5" class="textstyle">
  141.      <tr bgcolor="#305A36">
  142.       <td colspan="5" class="boldtext"><div align="center" class="stylewht">Customer
  143.         Preferences</div></td>
  144.      </tr>
  145.      <tr>
  146.       <td width="1%">&nbsp;</td>
  147.       <td width="17%" bordercolor="#FFFFFF" bgcolor="#C7E2C0">&nbsp;</td>
  148.       <td width="26%" bordercolor="#FFFFFF" bgcolor="#C7E2C0"><div align="center">refurb</div></td>
  149.       <td width="36%" bordercolor="#FFFFFF" bgcolor="#C7E2C0"><div align="center">extra
  150.         space</div></td>
  151.       <td width="20%" bordercolor="#FFFFFF" bgcolor="#C7E2C0"><div align="center">extra
  152.         light</div></td>
  153.      </tr>
  154.      <tr>
  155.       <td>&nbsp;</td>
  156.       <td align="center" valign="middle" bordercolor="#FFFFFF" bgcolor="#F2FFF2"><div align="right">Do
  157.         you need...</div></td>
  158.       <td bordercolor="#FFFFFF" bgcolor="#F2FFF2"><div align="center">
  159.         <input type="radio" name="need_refurb" value="1" />
  160.        </div></td>
  161.       <td bordercolor="#FFFFFF" bgcolor="#F2FFF2"><div align="center">
  162.         <input type="radio" name="need_xspace" value="1" />
  163.        </div></td>
  164.       <td bordercolor="#FFFFFF" bgcolor="#F2FFF2"><div align="center">
  165.         <input type="radio" name="need_xlight" value="1" />
  166.        </div></td>
  167.      </tr>
  168.      <tr>
  169.       <td>&nbsp;</td>
  170.       <td bordercolor="#FFFFFF" bgcolor="#C7E2C0"><div align="right"></div></td>
  171.       <td bordercolor="#FFFFFF" bgcolor="#C7E2C0"><div align="center">contemporary</div></td>
  172.       <td bordercolor="#FFFFFF" bgcolor="#C7E2C0"><div align="center">traditional</div></td>
  173.       <td bordercolor="#FFFFFF" bgcolor="#C7E2C0"><div align="center">mixed</div></td>
  174.      </tr>
  175.      <tr>
  176.       <td>&nbsp;</td>
  177.       <td bordercolor="#FFFFFF" bgcolor="#FBFFFB"><div align="right">Design
  178.         style</div></td>
  179.       <td bordercolor="#FFFFFF" bgcolor="#FBFFFB"><div align="center">
  180.         <input type="radio" name="designstyle_contemporary" value="1" />
  181.        </div></td>
  182.       <td bordercolor="#FFFFFF" bgcolor="#FBFFFB"><div align="center">
  183.         <input type="radio" name="designstyle_traditional" value="1" />
  184.        </div></td>
  185.       <td bordercolor="#FFFFFF" bgcolor="#FBFFFB"><div align="center">
  186.         <input type="radio" name="designstyle_mixed" value="1" />
  187.        </div></td>
  188.      </tr>
  189.      <tr>
  190.       <td>&nbsp;</td>
  191.       <td bordercolor="#FFFFFF" bgcolor="#C7E2C0"><div align="right"></div></td>
  192.       <td bordercolor="#FFFFFF" bgcolor="#C7E2C0"><div align="center">1
  193.         month</div></td>
  194.       <td bordercolor="#FFFFFF" bgcolor="#C7E2C0"><div align="center">6
  195.         months</div></td>
  196.       <td bordercolor="#FFFFFF" bgcolor="#C7E2C0"><div align="center">9
  197.         months</div></td>
  198.      </tr>
  199.      <tr>
  200.       <td>&nbsp;</td>
  201.       <td bordercolor="#FFFFFF" bgcolor="#F2FFF2"><div align="right">program
  202.         time completion</div></td>
  203.       <td bordercolor="#FFFFFF" bgcolor="#F2FFF2"><div align="center">
  204.         <input type="radio" name="programtimecompletion_1m" value="1" />
  205.        </div></td>
  206.       <td bordercolor="#FFFFFF" bgcolor="#F2FFF2"><div align="center">
  207.         <input type="radio" name="programtimecompletion_6m" value="1" />
  208.        </div></td>
  209.       <td bordercolor="#FFFFFF" bgcolor="#F2FFF2"><div align="center">
  210.         <input type="radio" name="programtimecompletion_9m" value="1" />
  211.        </div></td>
  212.      </tr>
  213.      <tr>
  214.       <td>&nbsp;</td>
  215.       <td bordercolor="#FFFFFF" bgcolor="#C7E2C0"><div align="right"></div></td>
  216.       <td bordercolor="#FFFFFF" bgcolor="#C7E2C0">3000k - 14999k</td>
  217.       <td bordercolor="#FFFFFF" bgcolor="#C7E2C0"><div align="center">15000k
  218.         - 45000k</div></td>
  219.       <td bordercolor="#FFFFFF" bgcolor="#C7E2C0">&nbsp; &gt; 45000k</td>
  220.      </tr>
  221.      <tr>
  222.       <td>&nbsp;</td>
  223.       <td bordercolor="#FFFFFF" bgcolor="#FBFFFB"><div align="right">budget
  224.         cost</div></td>
  225.       <td bordercolor="#FFFFFF" bgcolor="#FBFFFB"><div align="center">
  226.         <input type="radio" name="budgetcost_3k-15k" value="1" />
  227.        </div></td>
  228.       <td bordercolor="#FFFFFF" bgcolor="#FBFFFB"><div align="center">
  229.         <input type="radio" name="budgetcost_15k-45k" value="1" />
  230.        </div></td>
  231.       <td bordercolor="#FFFFFF" bgcolor="#FBFFFB"><div align="center">
  232.         <input type="radio" name="budgetcost_over45k" value="1" />
  233.        </div></td>
  234.      </tr>
  235.      <tr>
  236.       <td>&nbsp;</td>
  237.       <td bordercolor="#FFFFFF" bgcolor="#C7E2C0"><div align="right"></div></td>
  238.       <td bordercolor="#FFFFFF" bgcolor="#C7E2C0"><div align="center">yes</div></td>
  239.       <td bordercolor="#FFFFFF" bgcolor="#C7E2C0"><div align="center">no</div></td>
  240.       <td bordercolor="#FFFFFF" bgcolor="#C7E2C0"><div align="center">maybe</div></td>
  241.      </tr>
  242.      <tr>
  243.       <td>&nbsp;</td>
  244.       <td bordercolor="#FFFFFF" bgcolor="#F2FFF2"><div align="right">is
  245.         program<br />
  246.         more important than cost</div></td>
  247.       <td bordercolor="#FFFFFF" bgcolor="#E9EFE4"><div align="center">
  248.         <input type="radio" name="imortantthancost_yes" value="1" />
  249.        </div></td>
  250.       <td bordercolor="#FFFFFF" bgcolor="#E9EFE4"><div align="center">
  251.         <input type="radio" name="imortantthancost_no" value="1" />
  252.        </div></td>
  253.       <td bordercolor="#FFFFFF" bgcolor="#E9EFE4"><div align="center">
  254.         <input type="radio" name="imortantthancost_maybe" value="1" />
  255.        </div></td>
  256.      </tr>
  257.      <tr>
  258.       <td>&nbsp;</td>
  259.       <td bordercolor="#FFFFFF" bgcolor="#FBFFFB"><div align="right">is
  260.         design more important than program<br />
  261.        </div></td>
  262.       <td bordercolor="#FFFFFF" bgcolor="#E9EFE4"><div align="center">
  263.         <input type="radio" name="imortantthanprogram_yes" value="1" />
  264.        </div></td>
  265.       <td bordercolor="#FFFFFF" bgcolor="#E9EFE4"><div align="center">
  266.         <input type="radio" name="imortantthanprogram_no" value="1" />
  267.        </div></td>
  268.       <td bordercolor="#FFFFFF" bgcolor="#E9EFE4"><div align="center">
  269.         <input type="radio" name="imortantthanprogram_maybe" value="1" />
  270.        </div></td>
  271.      </tr>
  272.      <tr>
  273.       <td>&nbsp;</td>
  274.       <td bordercolor="#FFFFFF" bgcolor="#F2FFF2"><div align="right">is
  275.         cost more important than design<br />
  276.        </div></td>
  277.       <td bordercolor="#FFFFFF" bgcolor="#E9EFE4"><div align="center">
  278.         <input type="radio" name="imortantthandesign_yes" value="1" />
  279.        </div></td>
  280.       <td bordercolor="#FFFFFF" bgcolor="#E9EFE4"><div align="center">
  281.         <input type="radio" name="imortantthandesign_no" value="1" />
  282.        </div></td>
  283.       <td bordercolor="#FFFFFF" bgcolor="#E9EFE4"><div align="center">
  284.         <input type="radio" name="imortantthandesign_maybe" value="1" />
  285.        </div></td>
  286.      </tr>
  287.      <tr>
  288.       <td>&nbsp;</td>
  289.       <td bordercolor="#FFFFFF" bgcolor="#C7E2C0"><div align="right"></div></td>
  290.       <td bordercolor="#FFFFFF" bgcolor="#C7E2C0"><div align="center">to
  291.         rent</div></td>
  292.       <td bordercolor="#FFFFFF" bgcolor="#C7E2C0"><div align="center">to
  293.         sell</div></td>
  294.       <td bordercolor="#FFFFFF" bgcolor="#C7E2C0"><div align="center">to
  295.         keep</div></td>
  296.      </tr>
  297.      <tr>
  298.       <td>&nbsp;</td>
  299.       <td align="left" bordercolor="#FFFFFF" bgcolor="#FBFFFB"><div align="right">Why
  300.         are you building<br />
  301.        </div></td>
  302.       <td bordercolor="#FFFFFF" bgcolor="#FBFFFB"><div align="center">
  303.         <input type="radio" name="whybuild_rent" value="1" />
  304.        </div></td>
  305.       <td bordercolor="#FFFFFF" bgcolor="#FBFFFB"><div align="center">
  306.         <input type="radio" name="whybuild_sell" value="1" />
  307.        </div></td>
  308.       <td bordercolor="#FFFFFF" bgcolor="#FBFFFB"><div align="center">
  309.         <input type="radio" name="whybuild_keep" value="1" />
  310.        </div></td>
  311.      </tr>
  312.      <tr>
  313.       <td>&nbsp;</td>
  314.       <td align="right" bordercolor="#FFFFFF" bgcolor="#F4FFF4">any other
  315.        notes</td>
  316.       <td colspan="2" bordercolor="#FFFFFF" bgcolor="#F4FFF4"><textarea name="otherbuildingnotes" cols="30" rows="2" class="textstyle" id="otherbuildingnotes"></textarea></td>
  317.       <td bordercolor="#FFFFFF" bgcolor="#F4FFF4">&nbsp;</td>
  318.      </tr>
  319.      <tr>
  320.       <td>&nbsp;</td>
  321.       <td colspan="2"><div align="right">
  322.         <input type="submit" name="Submit" value="Submit" class="textstyle"/>
  323.        </div></td>
  324.       <td colspan="2"><input type="reset" name="reset" value="Reset" class="textstyle"/></td>
  325.      </tr>
  326.     </table>
  327.    </form></td>
  328.  </tr>
  329. </table>
  330. <?
  331. }
  332. ?>
  333. </html>


now here is the php to actually view what has been filled in:

Code: [ Select ]
<?php
$user="";//again i took it out for this posting. all values are the same
$host="";//with regards to the user,host,database,password
$password="";//for both files
$database="";
$connection=mysql_connect($host,$user,$password) or die ("could not connect to server");
$db=mysql_select_db($database,$connection);
$result = mysql_query("select * from getstarted",$connection);
echo "<table border=1 cellpadding=2 cellspacing=2 >";
echo "<tr><td><b>Name</b></td><td><b>email</b></td><td><b>contact address</b></td><td><b>mobile</b></td><td><b>work / home phone number</b></td><td><b>contact postcode</b></td><td><b>project postcode</b></td><td><b>garden project</b></td><td><b>loft project</b></td><td><b>refit project</b></td><td><b>extension project</b></td><td><b>for shop use</b></td><td><b>for office use</b></td><td><b>for home use</b></td><td><b>for another use</b></td><td><b>engineer</b></td><td><b>partywall</b></td><td><b>Project Manager</b></td><td><b>Design</b></td><td><b>Lifestyle</b></td><td><b>Strucural</b></td><td><b>Planning</b></td><td><b>Building Regs</b></td><td><b>Other help</b></td><td><b>Wheelchair Ecology</b></td><td><b>Partial eye sight</b></td><td><b>terraced</b></td><td><b>family and children</b></td><td><b>Semi detached</b></td><td><b>Aged</b></td><td><b>Allergy</b></td><td><b>Detached</b></td><td><b>Other</b></td><td><b>Other needs</b></td><td><b>needs refurbishment</b></td><td><b>Need Extra Space</b></td><td><b>Needs Extra Light</b></td><td><b>Design Style: Contemporary</b></td><td><b>Design style: Traditional</b></td><td><b>Design style: Mixed</b></td><td><b>Program time completion: 1 month</b></td><td><b>Program Time Completion: 6 months</b></td><td><b>Program time completion: 9 months</b></td><td><b>budget cost of 3k-14k</b></td><td><b>budget cost of 15k-45k</b></td><td><b>budget cost of over45k</b></td><td><b>important than cost: yes</b></td><td><b>important than cost: no</b></td><td><b>important than cost: maybe</b></td><td><b>important than program: yes</b></td><td><b>important than program: no</b></td><td><b>important than program: maybe</b></td><td><b>important than design: yes</b></td><td><b>important than design: no</b></td><td><b>important than design: maybe</b></td><td><b>why build: rent</b></td><td><b>why build: sell</b></td><td><b>why build: keep</b></td><td><b>other building notes</b></td></tr>";
while ($myrow = mysql_fetch_array($result))
{
echo "<tr><td>";
echo $myrow["name"];
echo "<td>";
echo $myrow["email"];
echo "<td>";
echo $myrow["contact_address"];
echo "<td>";
echo $myrow["mobile"];
echo "<td>";
echo $myrow["workhome_tel"];
echo "<td>";
echo $myrow["contact_postcode"];
echo "<td>";
echo $myrow["project_postcode"];
echo "<td>";
echo $myrow["project_garden"];
echo "<td>";
echo $myrow["project_loft"];
echo "<td>";
echo $myrow["project_extension"];
echo "<td>";
echo $myrow["use_shop"];
echo "<td>";
echo $myrow["use_office"];
echo "<td>";
echo $myrow["use_home"];
echo "<td>";
echo $myrow["use_other"];
echo "<td>";
echo $myrow["engineer"];
echo "<td>";
echo $myrow["partywall"];
echo "<td>";
echo $myrow["projectmanager"];
echo "<td>";
echo $myrow["design"];
echo "<td>";
echo $myrow["lifestyle"];
echo "<td>";
echo $myrow["structural"];
echo "<td>";
echo $myrow["planning"];
echo "<td>";
echo $myrow["buildingregs"];
echo "<td>";
echo $myrow["otherhelp"];
echo "<td>";
echo $myrow["wheelchair"];
echo "<td>";
echo $myrow["partialeyesight"];
echo "<td>";
echo $myrow["terraced"];
echo "<td>";
echo $myrow["familychildren"];
echo "<td>";
echo $myrow["semidetached"];
echo "<td>";
echo $myrow["aged"];
echo "<td>";
echo $myrow["allergy"];
echo "<td>";
echo $myrow["detached"];
echo "<td>";
echo $myrow["other"];
echo "<td>";
echo $myrow["otherneeds"];
echo "<td>";
echo $myrow["needrefurb"];
echo "<td>";
echo $myrow["need_xspace"];
echo "<td>";
echo $myrow["need_xlight"];
echo "<td>";
echo $myrow["designstyle_contemporary"];
echo "<td>";
echo $myrow["designstyle_traditional"];
echo "<td>";
echo $myrow["designstyle_mixed"];
echo "<td>";
echo $myrow["programtimecompletion_1m"];
echo "<td>";
echo $myrow["programtimecompletion_6m"];
echo "<td>";
echo $myrow["programtimecompletion_9m"];
echo "<td>";
echo $myrow["budgetcost_3kto14k"];
echo "<td>";
echo $myrow["budgetcost_15kto45k"];
echo "<td>";
echo $myrow["budgetcost_over45k"];
echo "<td>";
echo $myrow["importantthancost_yes"];
echo "<td>";
echo $myrow["importantthancost_no"];
echo "<td>";
echo $myrow["importantthancost_maybe"];
echo "<td>";
echo $myrow["importantthanprogram_yes"];
echo "<td>";
echo $myrow["importantthanprogram_no"];
echo "<td>";
echo $myrow["importantthanprogram_maybe"];
echo "<td>";
echo $myrow["importantthandesign_yes"];
echo "<td>";
echo $myrow["importantthandesign_no"];
echo "<td>";
echo $myrow["importantthandesign_maybe"];
echo "<td>";
echo $myrow["whybuild_rent"];
echo "<td>";
echo $myrow["whybuild_sell"];
echo "<td>";
echo $myrow["whybuild_keep"];
echo "<td>";
echo $myrow["otherbuildingnotes"];
}
echo "</table>";
?>
  1. <?php
  2. $user="";//again i took it out for this posting. all values are the same
  3. $host="";//with regards to the user,host,database,password
  4. $password="";//for both files
  5. $database="";
  6. $connection=mysql_connect($host,$user,$password) or die ("could not connect to server");
  7. $db=mysql_select_db($database,$connection);
  8. $result = mysql_query("select * from getstarted",$connection);
  9. echo "<table border=1 cellpadding=2 cellspacing=2 >";
  10. echo "<tr><td><b>Name</b></td><td><b>email</b></td><td><b>contact address</b></td><td><b>mobile</b></td><td><b>work / home phone number</b></td><td><b>contact postcode</b></td><td><b>project postcode</b></td><td><b>garden project</b></td><td><b>loft project</b></td><td><b>refit project</b></td><td><b>extension project</b></td><td><b>for shop use</b></td><td><b>for office use</b></td><td><b>for home use</b></td><td><b>for another use</b></td><td><b>engineer</b></td><td><b>partywall</b></td><td><b>Project Manager</b></td><td><b>Design</b></td><td><b>Lifestyle</b></td><td><b>Strucural</b></td><td><b>Planning</b></td><td><b>Building Regs</b></td><td><b>Other help</b></td><td><b>Wheelchair Ecology</b></td><td><b>Partial eye sight</b></td><td><b>terraced</b></td><td><b>family and children</b></td><td><b>Semi detached</b></td><td><b>Aged</b></td><td><b>Allergy</b></td><td><b>Detached</b></td><td><b>Other</b></td><td><b>Other needs</b></td><td><b>needs refurbishment</b></td><td><b>Need Extra Space</b></td><td><b>Needs Extra Light</b></td><td><b>Design Style: Contemporary</b></td><td><b>Design style: Traditional</b></td><td><b>Design style: Mixed</b></td><td><b>Program time completion: 1 month</b></td><td><b>Program Time Completion: 6 months</b></td><td><b>Program time completion: 9 months</b></td><td><b>budget cost of 3k-14k</b></td><td><b>budget cost of 15k-45k</b></td><td><b>budget cost of over45k</b></td><td><b>important than cost: yes</b></td><td><b>important than cost: no</b></td><td><b>important than cost: maybe</b></td><td><b>important than program: yes</b></td><td><b>important than program: no</b></td><td><b>important than program: maybe</b></td><td><b>important than design: yes</b></td><td><b>important than design: no</b></td><td><b>important than design: maybe</b></td><td><b>why build: rent</b></td><td><b>why build: sell</b></td><td><b>why build: keep</b></td><td><b>other building notes</b></td></tr>";
  11. while ($myrow = mysql_fetch_array($result))
  12. {
  13. echo "<tr><td>";
  14. echo $myrow["name"];
  15. echo "<td>";
  16. echo $myrow["email"];
  17. echo "<td>";
  18. echo $myrow["contact_address"];
  19. echo "<td>";
  20. echo $myrow["mobile"];
  21. echo "<td>";
  22. echo $myrow["workhome_tel"];
  23. echo "<td>";
  24. echo $myrow["contact_postcode"];
  25. echo "<td>";
  26. echo $myrow["project_postcode"];
  27. echo "<td>";
  28. echo $myrow["project_garden"];
  29. echo "<td>";
  30. echo $myrow["project_loft"];
  31. echo "<td>";
  32. echo $myrow["project_extension"];
  33. echo "<td>";
  34. echo $myrow["use_shop"];
  35. echo "<td>";
  36. echo $myrow["use_office"];
  37. echo "<td>";
  38. echo $myrow["use_home"];
  39. echo "<td>";
  40. echo $myrow["use_other"];
  41. echo "<td>";
  42. echo $myrow["engineer"];
  43. echo "<td>";
  44. echo $myrow["partywall"];
  45. echo "<td>";
  46. echo $myrow["projectmanager"];
  47. echo "<td>";
  48. echo $myrow["design"];
  49. echo "<td>";
  50. echo $myrow["lifestyle"];
  51. echo "<td>";
  52. echo $myrow["structural"];
  53. echo "<td>";
  54. echo $myrow["planning"];
  55. echo "<td>";
  56. echo $myrow["buildingregs"];
  57. echo "<td>";
  58. echo $myrow["otherhelp"];
  59. echo "<td>";
  60. echo $myrow["wheelchair"];
  61. echo "<td>";
  62. echo $myrow["partialeyesight"];
  63. echo "<td>";
  64. echo $myrow["terraced"];
  65. echo "<td>";
  66. echo $myrow["familychildren"];
  67. echo "<td>";
  68. echo $myrow["semidetached"];
  69. echo "<td>";
  70. echo $myrow["aged"];
  71. echo "<td>";
  72. echo $myrow["allergy"];
  73. echo "<td>";
  74. echo $myrow["detached"];
  75. echo "<td>";
  76. echo $myrow["other"];
  77. echo "<td>";
  78. echo $myrow["otherneeds"];
  79. echo "<td>";
  80. echo $myrow["needrefurb"];
  81. echo "<td>";
  82. echo $myrow["need_xspace"];
  83. echo "<td>";
  84. echo $myrow["need_xlight"];
  85. echo "<td>";
  86. echo $myrow["designstyle_contemporary"];
  87. echo "<td>";
  88. echo $myrow["designstyle_traditional"];
  89. echo "<td>";
  90. echo $myrow["designstyle_mixed"];
  91. echo "<td>";
  92. echo $myrow["programtimecompletion_1m"];
  93. echo "<td>";
  94. echo $myrow["programtimecompletion_6m"];
  95. echo "<td>";
  96. echo $myrow["programtimecompletion_9m"];
  97. echo "<td>";
  98. echo $myrow["budgetcost_3kto14k"];
  99. echo "<td>";
  100. echo $myrow["budgetcost_15kto45k"];
  101. echo "<td>";
  102. echo $myrow["budgetcost_over45k"];
  103. echo "<td>";
  104. echo $myrow["importantthancost_yes"];
  105. echo "<td>";
  106. echo $myrow["importantthancost_no"];
  107. echo "<td>";
  108. echo $myrow["importantthancost_maybe"];
  109. echo "<td>";
  110. echo $myrow["importantthanprogram_yes"];
  111. echo "<td>";
  112. echo $myrow["importantthanprogram_no"];
  113. echo "<td>";
  114. echo $myrow["importantthanprogram_maybe"];
  115. echo "<td>";
  116. echo $myrow["importantthandesign_yes"];
  117. echo "<td>";
  118. echo $myrow["importantthandesign_no"];
  119. echo "<td>";
  120. echo $myrow["importantthandesign_maybe"];
  121. echo "<td>";
  122. echo $myrow["whybuild_rent"];
  123. echo "<td>";
  124. echo $myrow["whybuild_sell"];
  125. echo "<td>";
  126. echo $myrow["whybuild_keep"];
  127. echo "<td>";
  128. echo $myrow["otherbuildingnotes"];
  129. }
  130. echo "</table>";
  131. ?>


what is not happening is the autoresponder isnt working neither is the viewdb filling up with whatever has be filled out in the getstarted form. can someone have a look at it and help me with this problem please.

thank you
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • buzzby365
  • Proficient
  • Proficient
  • buzzby365
  • Posts: 288

Post 3+ Months Ago

here is the sql code that i am using:
Code: [ Select ]
CREATE TABLE getstarted (
id             MEDIUMINT NOT NULL AUTO_INCREMENT,
name             CHAR(50) NOT NULL,
email             varchar(75) not null,
contactAddress         varchar(255),
mobile             int(13),
workHomeTel        int(13),
contactPostcode        varchar(8),
projectPostcode        varchar(8),
projectGarden        Tinyint(1) default '0',
projectLoft        Tinyint(1) default '0',
projectXtension        Tinyint(1) default '0',
shopUse            Tinyint(1) default '0',
officeUse        Tinyint(1) default '0',
homeUse            Tinyint(1) default '0',
otherUses        varchar(255),
engineer        Tinyint(1) default '0',
partywall        Tinyint(1) default '0',
projectManager        Tinyint(1) default '0',
design            Tinyint(1) default '0',
lifestyle        Tinyint(1) default '0',
structural        Tinyint(1) default '0',
planning        Tinyint(1) default '0',
buildingregs        Tinyint(1) default '0',
otherHelp        varchar(255),
wheelchair        Tinyint(1) default '0',
partialeyesight        Tinyint(1) default '0',
terraced        Tinyint(1) default '0',
familyChildern        Tinyint(1) default '0',
semiDetached        Tinyint(1) default '0',
aged            Tinyint(1) default '0',
allergy            Tinyint(1) default '0',
detached        Tinyint(1) default '0',
other            Tinyint(1) default '0',
otherNeeds        Tinyint(1) default '0',
needsRefurbishment    Tinyint(1) default '0',
needsExtraSpace        Tinyint(1) default '0',
needsExtraLight        Tinyint(1) default '0',
contemporarydesignstyle    Tinyint(1) default '0',
tradfitionaldesignstyle    Tinyint(1) default '0',
mixedDesignstyle    Tinyint(1) default '0',
progtimecomplete1month    Tinyint(1) default '0',
progtimecomplete6months    Tinyint(1) default '0',
progtimecomplete9months    Tinyint(1) default '0',
budgetCost3kto14k    Tinyint(1) default '0',
budgetCost15kto44k    Tinyint(1) default '0',
budgetCostOver45k    Tinyint(1) default '0',
importantThanCostYes    Tinyint(1) default '0',
importantThanCostN    Tinyint(1) default '0',
importantThanCostMaybe    Tinyint(1) default '0',
importantThanProgYes    Tinyint(1) default '0',
importantThanProgNo    Tinyint(1) default '0',
importantThanProgMaybe    Tinyint(1) default '0',
importantThandesYes    Tinyint(1) default '0',
importantThandesNo    Tinyint(1) default '0',
importantThandesMaybe    Tinyint(1) default '0',
build2rent        Tinyint(1) default '0',
build2sell        Tinyint(1) default '0',
build2keep        Tinyint(1) default '0',
otherBuildingNotes    varchar(255),
PRIMARY KEY (id)
)
  1. CREATE TABLE getstarted (
  2. id             MEDIUMINT NOT NULL AUTO_INCREMENT,
  3. name             CHAR(50) NOT NULL,
  4. email             varchar(75) not null,
  5. contactAddress         varchar(255),
  6. mobile             int(13),
  7. workHomeTel        int(13),
  8. contactPostcode        varchar(8),
  9. projectPostcode        varchar(8),
  10. projectGarden        Tinyint(1) default '0',
  11. projectLoft        Tinyint(1) default '0',
  12. projectXtension        Tinyint(1) default '0',
  13. shopUse            Tinyint(1) default '0',
  14. officeUse        Tinyint(1) default '0',
  15. homeUse            Tinyint(1) default '0',
  16. otherUses        varchar(255),
  17. engineer        Tinyint(1) default '0',
  18. partywall        Tinyint(1) default '0',
  19. projectManager        Tinyint(1) default '0',
  20. design            Tinyint(1) default '0',
  21. lifestyle        Tinyint(1) default '0',
  22. structural        Tinyint(1) default '0',
  23. planning        Tinyint(1) default '0',
  24. buildingregs        Tinyint(1) default '0',
  25. otherHelp        varchar(255),
  26. wheelchair        Tinyint(1) default '0',
  27. partialeyesight        Tinyint(1) default '0',
  28. terraced        Tinyint(1) default '0',
  29. familyChildern        Tinyint(1) default '0',
  30. semiDetached        Tinyint(1) default '0',
  31. aged            Tinyint(1) default '0',
  32. allergy            Tinyint(1) default '0',
  33. detached        Tinyint(1) default '0',
  34. other            Tinyint(1) default '0',
  35. otherNeeds        Tinyint(1) default '0',
  36. needsRefurbishment    Tinyint(1) default '0',
  37. needsExtraSpace        Tinyint(1) default '0',
  38. needsExtraLight        Tinyint(1) default '0',
  39. contemporarydesignstyle    Tinyint(1) default '0',
  40. tradfitionaldesignstyle    Tinyint(1) default '0',
  41. mixedDesignstyle    Tinyint(1) default '0',
  42. progtimecomplete1month    Tinyint(1) default '0',
  43. progtimecomplete6months    Tinyint(1) default '0',
  44. progtimecomplete9months    Tinyint(1) default '0',
  45. budgetCost3kto14k    Tinyint(1) default '0',
  46. budgetCost15kto44k    Tinyint(1) default '0',
  47. budgetCostOver45k    Tinyint(1) default '0',
  48. importantThanCostYes    Tinyint(1) default '0',
  49. importantThanCostN    Tinyint(1) default '0',
  50. importantThanCostMaybe    Tinyint(1) default '0',
  51. importantThanProgYes    Tinyint(1) default '0',
  52. importantThanProgNo    Tinyint(1) default '0',
  53. importantThanProgMaybe    Tinyint(1) default '0',
  54. importantThandesYes    Tinyint(1) default '0',
  55. importantThandesNo    Tinyint(1) default '0',
  56. importantThandesMaybe    Tinyint(1) default '0',
  57. build2rent        Tinyint(1) default '0',
  58. build2sell        Tinyint(1) default '0',
  59. build2keep        Tinyint(1) default '0',
  60. otherBuildingNotes    varchar(255),
  61. PRIMARY KEY (id)
  62. )
  • Sabu
  • Beginner
  • Beginner
  • Sabu
  • Posts: 47

Post 3+ Months Ago

In Ozzu, nobody can hear you

SCREAM
  • buzzby365
  • Proficient
  • Proficient
  • buzzby365
  • Posts: 288

Post 3+ Months Ago

i have uploaded some code for you to look at. can you take a look at it and tell me where i went wrong please.

here is the code
its a text file

here is the sql code
sql code in a text file

Post Information

  • Total Posts in this topic: 4 posts
  • Users browsing this forum: No registered users and 85 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.