在PHP CodeIgniter应用程序中,有几个页面带有输入文本框和文本区域。
如何在php中实现会话保存,即每当用户关闭标签时
输入的数据应保持保存,直到用户退出应用程序。 或者是否有任何插件可以实现相同的目标?
示例HTML - (ci中的查看页面)
<div class="row">
<!-- <div class="panel-heading" value="" readonly="readonly">
<input type="text" class="form-control" value="New Entry for All fields" readonly="readonly" style="text-align: center;">
</div> -->
<div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">
Name of fielded persons
<input type="text" name="fieldEE[]" class="form-control fieldEE" value="" required="required" />
</div>
<div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
Alias
<input type="text" name="ALIASNAME[]" class="form-control ALIASNAME" value="" required="required" />
</div>
<div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
Sex
<select class="form-control" name="SEX[]">
<option value="M">Male</option>
<option value="F">Female</option>
<option value="O">Other</option>
</select>
</div>
<div class="col-lg-1 col-md-1 col-sm-6 col-xs-12">
Age
<input type="number" name="AGE[]" class="form-control" value="" required="required" min="1" max="99" />
</div>
<div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
Address
<textarea style="width: 100%" name="ADDRESS[]" required="required"></textarea>
</div>
<div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">
Father/Husband Name
<input type="text" name="FATHER_HUSBAND[]" class="form-control" value="" required="required" />
</div>
<div class="col-lg-2 col-md-2 col-sm-6 col-xs-12">
Religion
<select class="form-control" name="RELIGION[]">
<option value="M">Hinduism</option>
<option value="F">Islam</option>
<option value="F">Cristianity</option>
<option value="F">Sikhism</option>
<option value="F">Unkown</option>
</select>
</div>
<div class="col-lg-2 col-md-2 col-sm-6 col-xs-12">
Occupation
<select class="form-control" name="PROFESSION[]">
<option selected="" value="GOVT. SERVICE">GOVT. SERVICE</option>
<option value="MEDIA PERSON">MEDIA PERSON</option>
<option value="BUSINESSMAN">BUSINESSMAN</option>
<option value="ACADEMICIAN">ACADEMICIAN</option>
<option value="DOCTOR">DOCTOR</option>
<option value="HAWKER">HAWKER</option>
<option value="DRIVER">DRIVER</option>
<option value="FOOTHPATH DWELLER">FOOTHPATH DWELLER</option>
<option value="PROSTITUTION">PROSTITUTION</option>
<option value="MAOIST">MAOIST</option>
<option value="LAWYER">LAWYER</option>
<option value="OTHERS">OTHERS</option>
</select>
</div>
<div class="col-lg-2 col-md-2 col-sm-6 col-xs-12">
fielded Date
<div class='input-group date datetimepicker1'>
<input type='text' class="form-control" name="field_DATE[]" />
<span class="input-group-addon">
<span class="glyphicon glyphicon-calendar"> </span>
</span>
</div>
</div>
<div class="col-lg-2 col-md-2 col-sm-6 col-xs-12">
fielded Half
<select class="form-control" name="HALF[]">
<option value="M">1st</option>
<option value="F">2nd</option>
</select>
</div>
<div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
Against
<select name="fieldAGAINST[]" id="fieldAGAINST" class="form-control fieldAGAINST">
<option value="FIR">Against FIR</option>
<option value="WfieldANT">Against Wfieldant</option>
<option selected="" value="PETTY">In Petty Case</option>
<option value="SPECIFIC">Specific field</option>
<option value="PART-II">Part-II Case</option>
</select>
</div>
<div class="col-lg-2 col-md-2 col-sm-6 col-xs-12">
FIR Number
<input type="text" name="CASENO[]" id="CASENO" class="form-control CASENO" value="" required="required" />
</div>
<div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
FIR Date
<div class='input-group date datetimepicker1'>
<input type='text' name="CASE_YR[]" id="CASE_YR" class="form-control CASE_YR" />
<span class="input-group-addon">
<span class="glyphicon glyphicon-calendar"></span>
</span>
</div>
</div>
<div class="col-lg-2 col-md-2 col-sm-6 col-xs-12">
Place Of field
<input type="text" name="PLACE_field[]" class="form-control" value="" required="required" />
</div>
<div class="col-lg-2 col-md-2 col-sm-6 col-xs-12">
Region Sub
<input type="text" name="LOCAL_OUTSIDE[]" class="form-control" value="" required="required" />
</div>
<div class="col-lg-3 col-md-3 col-sm-6 col-xs-12" id="crimehead">
</div>
<div class="col-lg-3 col-md-3 col-sm-6 col-xs-12" id="under_section">
</div>
<div class="col-lg-12 col-md-12 col-sm-6 col-xs-12" style="text-align: right; cursor: pointer;">
<span class="glyphicon glyphicon-plus" id="add-row"></span>
<span class="glyphicon glyphicon-minus" id="dlt-row"></span>
</div>
</div>