0

Hi people, i'm new to php and i have this problem:
I am developing an application for an insurance company in php. I have 6 tables linked together by a common id in a database.
Applicant or user need so register before loging in.When they login,they fill in a form and submit.This is working fine.
My problem is i want applicant to be able to submit the form and continue later if they don't complete it, and when later they login they can continue and submit it into the database. You can visit the site to see what i mean Click Here Thanks in advance.

5
Contributors
8
Replies
34
Views
3 Years
Discussion Span
Last Post by iamthwee
0

What's the website supposed to show? I see a login/signup form.

The signup form just has a username, password and firstname and lastname. Why would an user not be able to complete this?

BTW, you'd be better to apply 2 password fields (one for confirmation) and maybe an email field. Names can be added in a profile form later on.

0

Thanks very much for your reply and concern.It seems i did not make myself clear. My problem is there is a page called 'plan.php' which applicant has to fill after they have registered and loged in. Now this is how to get there.. 1.register and login.

2.Click on Our Services and select-->Child Education Plan.

3.Down this page click an image with the words"Child Education Policy,Click to Fill the Form".

4.When the image is clicked a page called 'calculate.php' will load. ..you can either fill in that or ingore it.

5.Down that page click the button 'click to continue' to the next page called 'plan.php'.

6.Now this is the page i've been talking about.... that a registered applicant can partcially fill the form,save it and continue later when he/she logs in again at other day or time.

This is the page link Click Here

This is the 'plan.php' code:

This the 'plan.php' code
------------------------------------

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
<title>Legacy Protect</title>



<style type="text/css">

#topbar{
position:absolute;
border: 1px solid black;
padding: 2px;
background-color: lightyellow;
width: 420px;
visibility: hidden;
z-index: 100;
}

</style>


<style>
.help {
    background-color: #FFFF73;
    border-radius: 10px;
    display: none;
    opacity: 0.9;
    padding: 10px;
    z-index: 100;
}

.help_link:hover + span {
    display: inline;
}
</style>

<script type="text/javascript">

/***********************************************
* Floating Top Bar script- © Dynamic Drive (www.dynamicdrive.com)
* Sliding routine by Roy Whittle (http://www.javascript-fx.com/)
* This notice must stay intact for legal use.
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

var persistclose=0 //set to 0 or 1. 1 means once the bar is manually closed, it will remain closed for browser session
var startX = 30 //set x offset of bar in pixels
var startY = 5 //set y offset of bar in pixels
var verticalpos="fromtop" //enter "fromtop" or "frombottom"

function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function get_cookie(Name) {
var search = Name + "="
var returnvalue = "";
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search)
if (offset != -1) {
offset += search.length
end = document.cookie.indexOf(";", offset);
if (end == -1) end = document.cookie.length;
returnvalue=unescape(document.cookie.substring(offset, end))
}
}
return returnvalue;
}

function closebar(){
if (persistclose)
document.cookie="remainclosed=1"
document.getElementById("topbar").style.visibility="hidden"
}

function staticbar(){
    barheight=document.getElementById("topbar").offsetHeight
    var ns = (navigator.appName.indexOf("Netscape") != -1) || window.opera;
    var d = document;
    function ml(id){
        var el=d.getElementById(id);
        if (!persistclose || persistclose && get_cookie("remainclosed")=="")
        el.style.visibility="visible"
        if(d.layers)el.style=el;
        el.sP=function(x,y){this.style.left=x+"px";this.style.top=y+"px";};
        el.x = startX;
        if (verticalpos=="fromtop")
        el.y = startY;
        else{
        el.y = ns ? pageYOffset + innerHeight : iecompattest().scrollTop + iecompattest().clientHeight;
        el.y -= startY;
        }
        return el;
    }
    window.stayTopLeft=function(){
        if (verticalpos=="fromtop"){
        var pY = ns ? pageYOffset : iecompattest().scrollTop;
        ftlObj.y += (pY + startY - ftlObj.y)/8;
        }
        else{
        var pY = ns ? pageYOffset + innerHeight - barheight: iecompattest().scrollTop + iecompattest().clientHeight - barheight;
        ftlObj.y += (pY - startY - ftlObj.y)/8;
        }
        ftlObj.sP(ftlObj.x, ftlObj.y);
        setTimeout("stayTopLeft()", 10);
    }
    ftlObj = ml("topbar");
    stayTopLeft();
}

if (window.addEventListener)
window.addEventListener("load", staticbar, false)
else if (window.attachEvent)
window.attachEvent("onload", staticbar)
else if (document.getElementById)
window.onload=staticbar
</script>






<link rel="stylesheet" type="text/css" href="css/form.css"/>
<link rel="shortcut icon" type="image/x-icon" href="images/favicon.ico">
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"></script>
<script type="text/javascript" src="js/script.js"></script>
<style type="text/css">
body,td,th {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12px;
}
h2 {
    color: #325640;
    font-size: 20px;
}
a:link {
    text-decoration: none;
}
a:visited {
    text-decoration: none;
    color: #CCC;
}
a:hover {
    text-decoration: none;
    color: #CCC;
}
a:active {
    text-decoration: none;
    color: #CCC;
}
body {
    background-color: #C7DCC7;
}
</style>

<!-- social networks -->
<script type="text/javascript">
var switchTo5x=true;

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}








</script>
<script type="text/javascript" src="http://w.sharethis.com/button/buttons.js"></script>
<script type="text/javascript" src="http://s.sharethis.com/loader.js"></script>
<!-- social networks ends-->


<!-- dropdown menu css-->
    <link rel="stylesheet" href="css/demo.css">

    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
    <script>
    $(function () {
        $('nav li ul').hide().removeClass('fallback');
        $('nav li').hover(function () {
            $('ul', this).stop().slideToggle(200);
        });
    });
    </script>
<!-- dropdown menu css-->

    <!-- link calendar resources -->
    <link rel="stylesheet" type="text/css" href="cal/tcal.css" />
    <script type="text/javascript" src="cal/tcal.js"></script> 







<!-- dropdown menu css-->
 <style>





</style>

<!-- This function for automatically generated person ids-->
<?php
function generatePassword ($length = 8) 
{ 
  // start with a blank password 
  $genpassword = ""; 
  // define possible characters 
  $possible = "0123456789";  
  // set up a counter 
  $i = 0;  
  // add random characters to $password until $length is reached 
  while ($i < $length) {  
    // pick a random character from the possible ones 
    $char = substr($possible, mt_rand(0, strlen($possible)-1), 1); 
    // we don't want this character if it's already in the password 
    if (!strstr($genpassword, $char)) {  
      $genpassword .= $char; 
      $i++; 
    } 
  } 
  // done! 
  return $genpassword; 
}  
?>
<!--function for automatically generated person ids ENDS HERE-->






<!-- This function for automatically generated Application ID ids-->
<?php /*?><?php
function generatePassword_application_id ($length = 8) 
{ 
  // start with a blank password 
  $genpassword = ""; 
  // define possible characters 
  $possible = "0123456789ABCDEFGHIJKLMNPQRSTUVWXYZ";  
  // set up a counter 
  $i = 0;  
  // add random characters to $password until $length is reached 
  while ($i < $length) {  
    // pick a random character from the possible ones 
    $char = substr($possible, mt_rand(0, strlen($possible)-1), 1); 
    // we don't want this character if it's already in the password 
    if (!strstr($genpassword, $char)) {  
      $genpassword .= $char; 
      $i++; 
    } 
  } 
  // done! 
  return $genpassword; 
}  
?><?php */?>
<!--function for automatically generated APPLICATION IDS ENDS HERE-->






<!-- This function for automatically generated Application ID ids-->
<?php /*?><?php
function generatePassword_application_id ($length = 8) 
{ 
  // start with a blank password 
  $genpassword = ""; 
  // define possible characters 
  $possible = "0123456789ABCDEFGHIJKLMNPQRSTUVWXYZ";  
  // set up a counter 
  $i = 0;  
  // add random characters to $password until $length is reached 
  while ($i < $length) {  
    // pick a random character from the possible ones 
    $char = substr($possible, mt_rand(0, strlen($possible)-1), 1); 
    // we don't want this character if it's already in the password 
    if (!strstr($genpassword, $char)) {  
      $genpassword .= $char; 
      $i++; 
    } 
  } 
  // done! 
  return $genpassword; 
}  
?><?php */?>
<!--function for automatically generated  IDS ENDS HERE-->


























<!-- dropdown menu css-->

</head>
<body>

<div id="topbar">
<a href="" onClick="closebar(); return false"><img src="img/close.gif" border="0" /></a>
<h3>Please remember the result of the calculation you did
earlier, and fill in the same result in the PLAN DETAILS section of
this form. Thank you.</h2> <a href="calculate.php" style="font:Verdana, Geneva, sans-serif; color: #090; background-color:#FFFFFF">You can click here to go back to the 
calculator</a>
</div>
<div id="header">
    <!-- jQuery handles to place the header background images -->
  <div id="headerimgs">
        <div id="headerimg1" class="headerimg"></div>
        <div id="headerimg2" class="headerimg"></div>
  </div>
    <br/ ><br/ ><br/ >
  <div id="nav-outer">
    <div id="navigation">
 <div id="menu">
        <nav>
          <ul>
            <li> <a href="../index.php">HOME</a> </li>
            <li> <a href="services.php">OUR SERVICES</a>
              <ul class="fallback">
                <li><a href="childs.php">Child Education Plan</a></li>
                <li><a href="services.php">General Insurance</a></li>
                <li><a href="services.php">Life Assurance</a></li>
                <li><a href="services.php">Insurance Bond</a></li>
              </ul>
            </li>
            <li> <a href="clients.php">OUR CLIENTS</a>
              <ul class="fallback">
                <li><a href="others.php">Other Clients</a></li>
              </ul>
            </li>
            <li> <a href="#">ABOUT US</a>
              <ul class="fallback">
                <li><a href="about.php">History</a></li>
                <li><a href="insurance.php">Insuring Companies</a></li>
              </ul>
            </li>
            <li> <a href="team.php">MANAGEMENT</a> </li>

            <li> <a href="contact.php">CONTACT US</a>
          </ul>
          </li>
          </ul>
        </nav>
      </div>
    </div>
  </div>
  <!-- Slideshow controls -->

    <!-- jQuery handles for the text displayed on top of the images -->
    <br>
    <br>
    <br>
</div>
  <div class="content">
    <div class="content_resize">
    <div class="mainbars">
      <div class="article">
        <p class="infopost">APPLICATION FOR CHILD EDUCATION PLAN<br>
        </p>
        <div class="clr">
          <div class="clr">
            <p>&nbsp;</p>
          </div>
        </div>
        <p><strong><br>
        The Applicant is hereby notify that, it is a crime to present false infomation while completing this proposal form</strong><br>
          <br><form action="send_form_details.php" method="post" id="plan_form">
<div class="rows requiredRow"><h2>PERSONAL DETAILS</h2> <div class="row">
  <label>PESON'S ID</label>
    <br>
<input id="ids" name="ids" type="text" class="plan" required = "required" value="<?php echo generatePassword(); ?>"/></br>

<?php /*?><label>APPLICATION_ID</label>
<input id="application_id" name="application_id" type="text" class="plan" required = "required" value="<?php echo generatePassword_application_id(); ?>"/></br><?php */?>
</div>
</div>
<div class="row requiredRow">

        <legend>Title<br>
        <span>
        <input value="Mr" id="title" name="title" type="radio" aria-labelledby="Tittle-ariaLabel" class="required" required = "required" /> 
        <label for="rad_Tittle_1" id="Tittle-ariaLabel">Mr.</label>
        </span>
        <span> 
        <input value="Mrs" id="title" name="title" type="radio" aria-labelledby="Tittle-ariaLabel" class="required" required = "required" /> 
        <label for="rad_Tittle_2" id="Tittle-ariaLabel">Mrs.</label>
        </span>
        <span> 
        <input value="Miss" id="title" name="title" type="radio" aria-labelledby="Tittle-ariaLabel" class="required" required = "required" /> 
        <label for="rad_Tittle_3" id="Tittle-ariaLabel">Miss.</label>
        </span>
        <span> 
        <input value="Ms" id="title" name="title" type="radio" aria-labelledby="Tittle-ariaLabel" class="required" required = "required" /> 
        <label for="rad_Tittle_4" id="Tittle-ariaLabel">Ms.</label>
        </span>
        <span> 
        <input value="Rev" id="title" name="title" type="radio" aria-labelledby="Tittle-ariaLabel" class="required" required = "required" /> 
        <label for="rad_Tittle_5" id="Tittle-ariaLabel">Rev.</label>
        </span>
        <span>
        <input value="Dr" id="title" name="title" type="radio" aria-labelledby="Tittle-ariaLabel" class="required" required = "required" /> 
        <label for="rad_Tittle_6" id="Tittle-ariaLabel">Dr.</label>
        </span>
        <span> 
        <input value="Prof" id="title" name="title" type="radio" aria-labelledby="Tittle-ariaLabel" class="required" required = "required" /> 
        <label for="rad_Tittle_7" id="Tittle-ariaLabel">Prof.</label>
        </span>      </legend>

</div>
<div class="row">
    <label>If Other (Specify)</label>
    <br>
<input id="personal_specify" name="personal_specify" type="text" class="plan" required = "required"/>
</div>
<div class="row requiredRow">
    <label>Surname<br>
    </label>
    <input id="personal_surname" name="personal_surname" type="text" class="plan" required = "required" value=" <?php echo  $surname; ?>"/>
</div>
<div class="row">
    <label>Maiden Names<br>
    </label>
    <input id="personal_maiden" name="personal_maiden" type="text" class="plan"/>
</div>
<div class="row requiredRow">
    <label>Marital Status<br>
    </label>
    <select id="marital_status" name="marital_status" class="select" required = "required">
        <option value="Single">Single</option>
        <option value="Married">Married</option>
        <option value="Widowed">Widowed</option>
        <option value="Separated">Separated</option>
        <option value="Divorced">Divorced</option>
    </select>
</div>

<div class="row">
    <label>Other Names</label>
    <br>
<input id="personal_othernames" name="personal_othernames" class="plan" required = "required"/>
</div>
<div class="row requiredRow">
    <label for="Applicant Birth Date" id="Applicant Birth Date">Date of Birth</label>
    <br>
        <!-- add class="tcal" to your input field -->
        <div><input type="text" name="personal_bithdate" class="tcal" value="" /></div>
</div>
<div class="row">
    <label>Age Next Birthday</label>
    <br>
<input id="personal_agenext" name="personal_agenext" type="text" class="plan" required = "required"/>
</div>
<div class="row">
  <label>ID Card/Passport Number</label>
    <br>
<input id="personal_identity" name="personal_identity" type="text" class="plan" required = "required"/>
</div>
<div class="row requiredRow">
    <label>Nationality</label>
    <br>
<input id="personal_nationality" name="personal_nationality" type="text" class="plan" required = "required"/>
</div>
<div class="row">
    <label>Occupation</label>
    <br>
    <input id="personal_occupation" name="personal_occupation" type="text" class="plan" required = "required"/>
</div>
<div class="row">
    <label>Email Address</label>
    <br>
    <input id="email" name="email" type="email" class="plan"/>
</div>
<div class="row">
    <label>Name of Employer & Address</label>
    <br>
<input id="personal_address" name="personal_address" type="text" class="plan" required = "required"/>
</div>
<div class="row">
    <label>Phone Number</label>
    <br>
    <input id="personal_phone" name="personal_phone" type="personal_phone" class="plan"  required = "required"/>
</div>
<div class="row">
    <label>Residential Address</label>
    <br>
<input id="personal_res_add" name="personal_res_add" type="text" class="plan" required = "required"/>
</div>
<div class="row">
    <label>Postal Address</label>
    <br>
    <input id="personal_postal" name="personal_postal" type="text" class="plan" required = "required"/>
</div>


<div class="rows requiredRow">
  <h2>PLAN DETAILS</h2></div>
<div class="row" id="Assured Amount(GHC)">
    <label for="Assured Amount(GHC)" id="Assured Amount(GHC)">Assured Amount(GH¢)</label>
<a href="#" class="help_link"><img src="img/question_mark-icon.png" width="23" height="23" border="0"></a> <span class="help">Some help here on this input field.</span> <br>
<input id="Assured Amount(GHC)" name="Assured_Amount" type="text" aria-labelledby="AssuredAmountGH¢-ariaLabel" class="plan"/>
</div>
<div class="row">
    <label for="FIB Cover Amount (GHC)" id="Payment Cover Amount (GHC)">Premium Cover Amount(GH¢) <a href="#" class="help_link"><img src="img/question_mark-icon.png" width="23" height="23" border="0"></a> <span class="help">Some help here on this input field.</span><br>
    </label>
    <input id="FIB Cover Amount (GHC)" name="Payment_Cover_Amount" type="text" aria-labelledby="FIBCoverAmountGH¢-ariaLabel" class="plan"/>
</div>
<div class="row">
    <label for="Plan Term" id="Plan Term">Plan Term</label>
    <a href="#" class="help_link"><img src="img/question_mark-icon.png" width="23" height="23" border="0"></a> <span class="help">Some help here on this input field.</span><br>
<input id="Plan Term" name="Plan_Term" type="text" aria-labelledby="PlanTerm-ariaLabel" class="plan"/>
</div>
<div class="rows">
    <fieldset>
        <legend>Premium  payment option<br>
        <br>
        </legend>
        <span><input value="Monthly" id="rad_FIBpaymentoption_14" name="rad_FIBpaymentoption" type="radio" aria-labelledby="FIBpaymentoption-ariaLabel" /> <label for="rad_FIBpaymentoption_14" id="FIBpaymentoption-ariaLabel">Monthly</label></span>
        <span><input value="Quarterly" id="rad_FIBpaymentoption_15" name="rad_FIBpaymentoption" type="radio" aria-labelledby="FIBpaymentoption-ariaLabel" /> <label for="rad_FIBpaymentoption_15" id="FIBpaymentoption-ariaLabel">Quarterly</label></span>
        <span><input value="Half Yearly" id="rad_FIBpaymentoption_16" name="rad_FIBpaymentoption" type="radio" aria-labelledby="FIBpaymentoption-ariaLabel" /> <label for="rad_FIBpaymentoption_16" id="FIBpaymentoption-ariaLabel">Half Yearly</label></span>
        <span><input value="Annually" id="rad_FIBpaymentoption_17" name="rad_FIBpaymentoption" type="radio" aria-labelledby="FIBpaymentoption-ariaLabel" /> <label for="rad_FIBpaymentoption_17" id="FIBpaymentoption-ariaLabel">Annually</label></span>
    </fieldset>
</div>
<div class="rows">
    <fieldset>
        <legend>How do you want your policy document delivered ?</legend>
        <br>
        <span>
          <input value="by Email" id="rad_Howdoyouwantyourpolicydocumentdelivered?_18" name="rad_Howdoyouwantyourpolicydocumentdelivered" type="radio" aria-labelledby="Howdoyouwantyourpolicydocumentdelivered?-ariaLabel" /> 
          <label for="rad_Howdoyouwantyourpolicydocumentdelivered?_18" id="Howdoyouwantyourpolicydocumentdelivered?-ariaLabel">by Email</label>
          </span>
          <span>
            <input value="Post" id="rad_Howdoyouwantyourpolicydocumentdelivered?_19" name="rad_Howdoyouwantyourpolicydocumentdelivered" type="radio" aria-labelledby="Howdoyouwantyourpolicydocumentdelivered?-ariaLabel" /> 
            <label for="rad_Howdoyouwantyourpolicydocumentdelivered?_19" id="Howdoyouwantyourpolicydocumentdelivered?-ariaLabel">Post</label>
            </span>
          <span>
            <input value="Sales Executives" id="rad_Howdoyouwantyourpolicydocumentdelivered?_20" name="rad_Howdoyouwantyourpolicydocumentdelivered" type="radio" aria-labelledby="Howdoyouwantyourpolicydocumentdelivered?-ariaLabel" /> 
            <label for="rad_Howdoyouwantyourpolicydocumentdelivered?_20" id="Howdoyouwantyourpolicydocumentdelivered?-ariaLabel">Sales Executives</label>
            </span>
    </fieldset>
</div>
<div class="rows requiredRow"><h2>MEDICLAL INFORMATION</h2></div>
<div class="rows">
    <fieldset>
        <legend>Do you have any life assurance policy with us?<br>
        <br>
        </legend>
        <span>
          <input value="Yes" id="Any_Assurance" name="Any_Assurance" type="radio" aria-labelledby="Any life Assurance With Us?" /> 
          <label for="Any life Assurance With Us" id="Any_Assurance">Yes</label>
          </span>
          <span>
            <input value="No" id="Any_Assurance" name="Any_Assurance" type="radio" aria-labelledby="Doyouhave" /> 
            <label for="rad_Doyouhaveanylifeassurancepolicywithus" id="Doyouhaveanylifeassurancepolicywithus?-ariaLabel">No</label>
            </span>
    </fieldset>
</div>
<div class="row">
    <label for="Assurance Policy Details" id="Assurance Policy Details">If YES, please provide details</label>
    <br>
<textarea id="Assurance_Policy_Details" name="Assurance_Policy_Details" cols="20" rows="3" aria-labelledby="IfYESpleaseprovidedetails-ariaLabel" class="msg"></textarea>
</div>
<div class="rows">
    <fieldset>
        <legend>Do you participate in any hazardous activities related to your occupation or recreation such as diving, mountaineering, motor sports or aviation (excluding flying as a passenger on a regular scheduled airline)?</legend>
        <br>
        <span>
          <input value="Yes" id="Hazardous_Activity" name="Hazardous_Activity" type="radio" aria-labelledby="Hazardous_Activity" /> 
          <label for="Hazardous Activity" id="Hazardous_Activity">Yes</label>
          </span>
          <span>
            <input value="No" id="Hazardous_Activity" name="Hazardous_Activity" type="radio" aria-labelledby="Hazardous_Activity" /> 
            <label for="Hazardous_Activity" id="Hazardous_Activity">No</label>
            </span>
    </fieldset>
</div>
<div class="row">
    <label for="Hazardous_Details" id="Hazardous_Details">If YES, please provide details</label>
    <br>
    <textarea id="Hazardous_Details" name="Hazardous_Details" cols="20" rows="3" aria-labelledby="Hazardous_Details" class="msg"></textarea>
</div>
<div class="rows">
    <fieldset>
        <legend>Are you receiving any form of medical treatment or medication?</legend>
        <br>
        <span>
          <input value="Yes" id="Receiving_Medication" name="Receiving_Medication" type="radio" aria-labelledby="Receiving_Medication" /> 
          <label for="Receiving_Medication" id="Receiving_Medication">Yes</label>
          </span>
          <span>
            <input value="No" id="Receiving_Medication" name="Receiving_Medication" type="radio" aria-labelledby="Medication_Details" /> 
            <label for="Medication_Details" id="Medication_Details">No</label>
            </span>
    </fieldset>
</div>
<div class="row">
    <label for="Medication_Details" id="Medication_Details">If YES, please provide details</label>
    <br>
<textarea id="Medication_Details" name="Medication_Details" cols="20" rows="3" aria-labelledby="IfYESpleaseprovidedetails-ariaLabel" class="msg"></textarea>
</div>
<div class="rows">
    <fieldset>
        <legend>Do you drink alcohol?</legend>
        <br>
        <span>
          <input value="Yes" id="rad_Doyoudrinkalcohol" name="rad_Doyoudrinkalcohol" type="radio" aria-labelledby="Doyoudrinkalcohol?-ariaLabel" /> 
          <label for="rad_Doyoudrinkalcohol" id="rad_Doyoudrinkalcohol">Yes</label>
          </span>
          <span>
            <input value="No" id="rad_Doyoudrinkalcohol" name="rad_Doyoudrinkalcohol" type="radio" aria-labelledby="Doyoudrinkalcohol?-ariaLabel" /> 
            <label for="rad_Doyoudrinkalcohol" id="rad_Doyoudrinkalcohol">No</label>
            </span>
    </fieldset>
</div>
<div class="row">
    <label for="txt_IfYESwhatisyouraverageweeklyconsumption" id="IfYESwhat">If YES, what is your average weekly consumption?</label>
    <input id="txt_IfYESwhat" name="txt_IfYESwhat" type="text" aria-labelledby="IfYESwhatisyouraverageweeklyconsumption?-ariaLabel" class="plan"/>
</div>
<div class="rows">
    <fieldset>
        <legend>Have you smoked any cigarettes in the last 12 months?</legend>
        <br>
        <span>
          <input value="Yes" id="Haveyousmoke" name="Haveyousmoke" type="radio" aria-labelledby="Haveyousmoke" /> 
          <label for="rad_Haveyou12months" id="Haveyousmoke">Yes</label>
          </span>
          <span>
            <input value="No" id="rad_Haveyou12months" name="Haveyousmoke" type="radio" aria-labelledby="Haveyousmoke" /> 
            <label for="rad_Haveyousmokedanycigarettesinthelast12months" id="Have">No</label>
            </span>
    </fieldset>
</div>
<div class="row">
    <label for="txt_IfYESwhatisyour" id="IfYESwhatisyour">If YES, what is your average weekly consumption?</label>
    <input id="consumption_smoke_average" name="consumption_smoke_average" type="text" aria-labelledby="IfYESwhatisyour" class="plan"/>
</div>
<div class="row">
    <label for="txt_PleasestateyourHeight" id="PleasestateyourHeight-ariaLabel">Please state your Height</label>
    <br>
<input id="height" name="height" type="text" aria-labelledby="PleasestateyourHeight-ariaLabel" class="plan"/>
</div>
<div class="rows">
    <fieldset>
        <legend>Are you currently in good health, free from any illness or disease and not undergoing any medical treatment or surgery?</legend>
        <br>
        <span>
          <input value="Yes" id="current_health" name="current_health" type="radio" aria-labelledby="Areyoucurrently" /> 
          <label for="rad_Areyoucurrently" id="Areyoucurrently">Yes</label>
          </span>
          <span>
            <input value="No" id="current_health" name="current_health" type="radio" aria-labelledby="Areyoucurrently" /> 
            <label for="" id="">No</label>
            </span>
    </fieldset>
</div>
<div class="rows">
    <label for="txtarea_IfNOpleaseprovidedetails" id="IfNOpleaseprovidedetails">If NO, please provide details</label>
    <br>
<textarea id="if_no_health" name="if_no_health" cols="20" rows="3" aria-labelledby="IfNOpleaseprovidedetails-ariaLabel" class="msg"></textarea>
</div>
<div class="row">
    <label for="txt_IllnessorInjury" id="IllnessorInjury-ariaLabel">Illness or Injury</label>
    <br>
<input id="injury" name="injury" type="text" aria-labelledby="IllnessorInjury-ariaLabel" class="plan"/>
</div>
<div class="row">
    <label for="txt_HospitalAttended" id="HospitalAttended-ariaLabel">Hospital Attended</label>
    <br>
<input id="hospital_attended" name="hospital_attended" type="text" aria-labelledby="HospitalAttended-ariaLabel" class="plan"/>
</div>
<div class="row">
    <label for="txt_Duration" id="Duration-ariaLabel">Duration</label>
    <br>
<input id="injury_duration" name="injury_duration" type="text" aria-labelledby="Duration-ariaLabel" class="plan"/>
</div>
<div class="row">
    <label for="txt_PresentCondition" id="PresentCondition-ariaLabel">Present Condition</label>
    <br>
<input id="present_condition" name="present_condition" type="text" aria-labelledby="PresentCondition-ariaLabel" class="plan"/>
</div>
<div class="rows requiredRow"><h2>BENEFICIARY</h2></div>
<div class="row">
    <label for="txt_Surname" id="Surname-ariaLabel">Surname</label>
    <br>
    <input id="beneficiary_surname" name="beneficiary_surname" type="text" aria-labelledby="Surname-ariaLabel" class="plan"/>
</div>
<div class="row">
    <label for="txt_Othernames" id="Othernames-ariaLabel">Othername(s)</label>
    <br>
    <input id="beneficiary_othernames" name="beneficiary_othernames" type="text" aria-labelledby="Othernames-ariaLabel" class="plan"/>
</div>
<div class="row">
    <label for="beneficiary_gender" id="GenderMF-ariaLabel">Gender(M/F)</label>
    <br>
<select id="beneficiary_gender" name="beneficiary_gender" class="select" required = "required">
        <option value="Male">Male</option>
        <option value="Female">Female</option>

    </select>
</div>
<div class="row">
    <label for="DateofBirth" id="DateofBirth-ariaLabel">Date of Birth</label>
    <br>
        <!-- add class="tcal" to your input field -->
        <div><input type="beneficiary_dateofbirth" name="beneficiary_dateofbirth" class="tcal" value="" /></div>
</div>
<div class="row">
    <label for="txt_Relationship" id="Relationship-ariaLabel">Relationship</label>
    <br>
    <input id="relation_to_beneficiary" name="relation_to_beneficiary" type="text" aria-labelledby="Relationship-ariaLabel" class="plan"/>
</div>
<div class="rows requiredRow">
  <h2>TRUSTEES, (Applicable when the beneficiary is less than 18)</h2></div>
<div class="row">
    <label for="txt_Surname" id="Surname-ariaLabel">Surname</label>
    <br>
<input id="trustees_surname" name="trustees_surname" type="text" aria-labelledby="Surname-ariaLabel" class="plan"/>
</div>
<div class="row">
    <label for="trustees_othernames" id="Othernames-ariaLabel">Othername(s)</label>
    <br>
<input id="trustees_othernames" name="trustees_othernames" type="text" aria-labelledby="Othernames-ariaLabel" class="plan"/>
</div>
<div class="row">
    <label for="txt_GenderMF" id="GenderMF-ariaLabel">Gender(M/F)<br>
    </label>
    <select id="trustees_gender" name="trustees_gender" class="select" required = "required">
        <option value="Male">Male</option>
        <option value="Female">Female</option>

    </select>
</div>
<div class="row">
    <label for="DateofBirth" id="DateofBirth-ariaLabel">Date of Birth</label>
    <br>
            <!-- add class="tcal" to your input field -->
        <div><input type="trustees_dob" name="trustees_dob" class="tcal" value="" /></div>
</div>
<div class="row">
    <label for="txt_Relationship" id="Relationship-ariaLabel">Relationship</label>
    <br>
    <input id="trustees_relationship" name="trustees_relationship" type="text" aria-labelledby="Relationship-ariaLabel" class="plan"/>
</div>
<div class="rows requiredRow">
  <h2>DECLARATION<br>
    <br>
  </h2>
  <div>
    <div>
      <p>I hereby  declare that all   the foregoing answers are true and complete and that I have  not   concealed or withheld any information that will render the assurance on   my life  more hazardous than is truly the case. I  understand that failure to provide true and complete answers to all questions  may entitle the Company to reject a<br>
        claim  made under the policy.</p>
      <p>I hereby  authorize any doctor or hospital that has medical   information needed in  connection with this application, including full   details of my past medical  history to release same to Colina Life Ghana   Ltd. on  request. I agree that this proposal and any medical report obtained shall form  the basis of this contract.</p>
      <div> </div>
    </div>
  </div>
  <div></div>
</div>
<div class="row" id="imageField">
  <button type="submit" name="submit" class="btn btn-success"  a href="plan.php"></a>Submit</button>
</div>
          </form>

        </p>
      </div>
  </div>
    <div>
    <p>&nbsp;</p></div>
</div>


<div class="footer">
  <div class="footer_resize">
    <p class="lf">&copy; Copyright 2013 <a href="#">Legacy Protect </a></p>
    <p class="rf"><a href="#">In-tech Solutions</a></p>
    <div style="clear:both;"><br>
      <script type="text/javascript">stLight.options({publisher: "7220e9c3-3507-43dc-9152-0eccac5f4c0d", doNotHash: false, doNotCopy: false, hashAddressBar: false});</script>
      <script>
var options={ "publisher": "7220e9c3-3507-43dc-9152-0eccac5f4c0d", "scrollpx": 50, "ad": { "visible": false}, "chicklets": { "items": ["facebook", "twitter", "linkedin", "googleplus"]}};
var st_pulldown_widget = new sharethis.widgets.pulldownbar(options);
      </script>
    </div>
  </div>
</div>
</body>
</html>





-----------------------------------------------------------------------
This the 'send_form_details.php'.----->this is where the form is processed and sent to the database.
--------------------------------------------------------------------------


    <?php 
include('dbcon.php');
?>

<?php


    if (isset($_POST['submit'])){
    //*************THIS IS FOR THE PERSONAL INFORMATION******************************************   

    $title=$_POST['title'];
    $personal_surname=$_POST['personal_surname'];
    $personal_othernames=$_POST['personal_othernames'];
    $personal_maiden=$_POST['personal_maiden'];
    $personal_agenext=$_POST['personal_agenext'];
    $personal_nationality=$_POST['personal_nationality'];
    $email=$_POST['email']; 
    $personal_phone=$_POST['personal_phone'];
    $personal_postal=$_POST['personal_postal'];
    $personal_specify=$_POST['personal_specify'];
    $personal_bithdate=$_POST['personal_bithdate'];
    $personal_identity=$_POST['personal_identity'];
    $personal_occupation=$_POST['personal_occupation'];
    $personal_address=$_POST['personal_address'];
    $personal_res_add=$_POST['personal_res_add'];
    $marital_status=$_POST['marital_status'];
    $ids=$_POST['ids'];
        //******************PERSONAL INFORMATION STARTS HERE**************************************************************
    $Assured_Amount=$_POST['Assured_Amount'];
    $plan_term=$_POST['plan_term'];
    $rad_Howdoyouwantyourpolicydocumentdelivered =$_POST['rad_Howdoyouwantyourpolicydocumentdelivered'];
    //$Payment_Cover_Amount=$_POST['Payment_Cover_Amount'];
    $rad_FIBpaymentoption=$_POST['rad_FIBpaymentoption'];
    $ids=$_POST['ids'];
//************************************************************************************************************************


//******************MEDICALS INFORMATION STARTS HERE**************************************************************

    $Any_Assurance=$_POST['Any_Assurance'];
    $Assurance_Policy_Details=$_POST['Assurance_Policy_Details'];
    $Hazardous_Activity=$_POST['Hazardous_Activity'];
    $Hazardous_Details=$_POST['Hazardous_Details'];
    $Receiving_Medication=$_POST['Receiving_Medication'];
    $Medication_Details=$_POST['Medication_Details'];
    $rad_Doyoudrinkalcohol=$_POST['rad_Doyoudrinkalcohol']; 
    $txt_IfYESwhat=$_POST['txt_IfYESwhat']; 
    $Haveyousmoke=$_POST['Haveyousmoke'];
    $consumption_smoke_average=$_POST['consumption_smoke_average'];
    $current_health=$_POST['current_health'];
    $if_no_health=$_POST['if_no_health'];
    $injury=$_POST['injury'];
    $injury_duration=$_POST['injury_duration'];
    $hospital_attended=$_POST['hospital_attended'];
    $present_condition=$_POST['present_condition'];
    $height=$_POST['height'];
    $weight=$_POST['weight'];
    $ids=$_POST['ids'];

//******************BENEFICIARY  STARTS  HERE**************************************************************
    $ids=$_POST['ids'];
    $beneficiary_surname=$_POST['beneficiary_surname'];
    $beneficiary_gender=$_POST['beneficiary_gender'];
    $beneficiary_othernames=$_POST['beneficiary_othernames'];
    $beneficiary_dob=$_POST['beneficiary_dateofbirth'];
    $relation_to_beneficiary=$_POST['relation_to_beneficiary'];


//******************TRUSTEES STARTS  HERE**************************************************************


    $ids=$_POST['ids'];
    $trustees_surname=$_POST['trustees_surname'];
    $trustees_gender=$_POST['trustees_gender'];
    $trustees_relationship=$_POST['trustees_relationship'];
    $trustees_othernames=$_POST['trustees_othernames'];
    $trustees_dob=$_POST['trustees_dob'];






    mysql_query("insert into intechso_personal_information (title,surname,other_names,maiden_names,marital_status,age_next_birthday,nationality,email_address,phone_number,
    postal_address,other,date_of_birth,persons_identification,occupation,name_employer_and_address,residential_address,persons_id,date_registered)

    values('$title','$personal_surname','$personal_othernames','$personal_maiden','$marital_status','$personal_agenext','$personal_nationality','$email',
    '$personal_phone','$personal_postal','$personal_specify','$personal_bithdate','$personal_identity','$personal_occupation','$personal_address','$personal_res_add', '$ids',NOW())
    ")or die(mysql_error());




    mysql_query("insert into intechso_plan_details (assured_amount,plan_term,document_delivery,payment_option,persons_id)

    values('$Assured_Amount','$plan_term','$rad_Howdoyouwantyourpolicydocumentdelivered','$rad_FIBpaymentoption','$ids')
   ")or die(mysql_error());




  mysql_query("insert into intechso_medical_information (policy_yes_no,if_yes_policy,hazardous_activities,if_yes_hazardous,medical_treatment,
  if_yes_medical_details,drink_alcohol, if_yes_consumption,do_you_smoke,consumption_smoke,current_health,if_no_health,injury,injury_duration,
  hospital_attended,present_condition,height,weight, persons_id)

    values('$Any_Assurance','$Assurance_Policy_Details','$Hazardous_Activity','$Hazardous_Details','$Receiving_Medication','$Medication_Details',
    '$rad_Doyoudrinkalcohol','$txt_IfYESwhat','$Haveyousmoke','$consumption_smoke_average','$current_health','$if_no_health',
    '$injury','$injury_duration','$hospital_attended','$present_condition','$height','$weight','$ids')
  ")or die(mysql_error());






  mysql_query("insert into intechso_beneficiary (persons_id,beneficiary_surname,beneficiary_gender,beneficiary_othernames,beneficiary_dob,relation_to_beneficiary)

    values('$ids','$beneficiary_surname','$beneficiary_gender','$beneficiary_othernames','$beneficiary_dob','$relation_to_beneficiary')
   ")or die(mysql_error());





    mysql_query("insert into intechso_trustees (persons_id,trustees_surname,trustees_gender,trustees_relationship,trustees_othernames,trustees_dob)

    values('$ids','$trustees_surname','$trustees_gender','$trustees_relationship','$trustees_othernames','$trustees_dob')
   ")or die(mysql_error());




?>


    <script type="text/javascript">
    alert('You are Successfully Register Thank You');
    //window.location="index.php";
    </script>

    <?php
    }

    ?>




---------------------------------
This is for the login 'login1.php'

<?php
include('dbcon.php');

if (isset($_POST['login'])) {
$UserName=$_POST['UserName'];
$Password=md5($_POST['Password']);
$result=mysql_query("select * from members where UserName='$UserName' and Password='$Password'")or die (mysql_error());

$count=mysql_num_rows($result);
$row=mysql_fetch_array($result);

        if ($count > 0){
        session_start();
        $_SESSION['member_id']=$row['member_id'];
        header('location:./home.php');
        }else{?>
        <!--header('location:index.php');-->
    <div class="alert alert-error">Error login! Please check your username or password</div>
    <?php
        }
}
?>
0

Sorry, I don't have time to peruse 1000 lines of mixed js/html/php/css. Anybody else?

0

That's true.Thanks any way. But can i get mysql php code that users can register and login. When a user login,it should show only his/her profile according to his/her login credentials. Thanks in advace

0

a very famous programmer: JustinCase :always instructed.
Make sure you test everything and have the client sign off on everything.

An application for a bunch of litigious expletive deleteds, who, as a group, have a reputation for misconduct; suing the other parties to the contract: not paying their due; is not, generally, a good beginner's task ..

Hi people, i'm new to php and i have this problem:
I am developing an application for an insurance company in php
is a farkin scary statement

Edited by almostbob

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.