Forum Moderators: coopster

Message Too Old, No Replies

Multi page forms

Can' get all the info carried through

         

dcrandall

5:20 pm on Mar 8, 2011 (gmt 0)

10+ Year Member



I am creating a multi page job application in php that people will complete here at my home. my goal is to have applicants complete the form, then be presented with a screen w/ their info that can be printed. my problem is that I can't get all of the info carried through to the "review" page. only the info from the preceding page is presented. I know it's most likely a scripting error on my part, but I have no clue. if anyone wants to look at it and laugh at my coding, the form is at [denniscrandall.com ]Any help would be appreciated!

eelixduppy

4:02 am on Mar 9, 2011 (gmt 0)



Hello and Welcome to WebmasterWorld!

How are you passing the data from one page to another? Are you using sessions [php.net]? If not you should probably consider this so that you have all the data as you move from page to page.

dcrandall

6:16 pm on Mar 9, 2011 (gmt 0)

10+ Year Member



Yes, I am using sessions (at least i believe I am). I'm new to php, so am unsure what I'm doing.

My first form code;


<form action="address.php" method="post">
<table width="75%" border="0" cellpadding="0">
<tr align="center">
<th valign="middle">NAME;</th>
<td><span id="spryselect1">
<label for="title2"></label>
<select name="title" id="title2">
<option selected="selected">TITLE</option>
<option value="Ms.">Ms.</option>
<option value="Mrs.">Mrs.</option>
<option value="Mr.">Mr.</option>
</select><sup>*</sup>
<br />
<span class="selectRequiredMsg">Please select an item.</span></span></td>
<td><span id="sprytextfield1">
<label for="last"></label>
<input name="last" type="text" id="last" onkeydown="if(event.keyCode==13) event.keyCode=9" onkeyup="return autoTab(this, 15, event)" />
<sup>*</sup>
<br />
<span class="textfieldRequiredMsg">A value is required.</span></span></td>
<td><span id="sprytextfield2">
<label for="first"></label>
<input name="first" type="text" id="first" onkeydown="if(event.keyCode==13) event.keyCode=9" onkeyup="return autoTab(this, 15, event)" /><sup>*</sup>
<br />
<span class="textfieldRequiredMsg">A value is required.</span></span></td>
<td style='padding:.75pt .75pt .75pt .75pt'><span id="sprytextfield4">
<input name="innitial" type="text" id="innitial" onkeyup="return autoTab(this, 1, event)" size="2" maxlength="1" />
</span></td>
<td><label for="suffix"></label>
<input name="suffix" type="text" id="suffix" onchange="javascript:this.value=this.value.toUpperCase()" onkeydown="if(event.keyCode==13) event.keyCode=9" onkeyup="return autoTab(this, 3, event)" size="3" maxlength="3" /></td>
</tr>
</table>
<br />
<table width="100%" border="0" cellpadding="5">
<tr>
<td width="50%"><table width="100%" border="0" cellpadding="5">
<tr>
<th width="60%" align="right" nowrap="nowrap"><div class="hide"><a href="javascript:explain('Social Security Number', 'opener.document.form.username.value', 'Please enter your Sosial Security Number. &lt;B&gt;&lt;U&gt;DO NOT&lt;/b&gt;&lt;/u&gt; type any slashes (/), dashes (-) or spaces. The field has been automatically formatted and the cursor will go to the next field once the maximum limit has been reached');" onmouseover="window.status='Click for explanation...';return true;" onmouseout="window.status='';return true;">Social Security Number;</a><sup>*</sup></div></th>
<td width="10%" align="center" nowrap="nowrap"><span id="sprytextfield3">
<input name="ssn1" type="text" id="ssn1" onkeyup="return autoTab(this, 3, event)" size="3" maxlength="3" /><br />
<span class="textfieldRequiredMsg">A value is required.</span></span></td>
<td width="5%" align="center" nowrap="nowrap">-</td>
<td width="10%" align="center" nowrap="nowrap"><span id="sprytextfield5">
<input name="ssn2" type="text" id="ssn2" onkeyup="return autoTab(this, 2, event)" size="2" maxlength="2" /><br />
<span class="textfieldRequiredMsg">A value is required.</span></span></td>
<td width="5%" align="center" nowrap="nowrap">-</td>
<td width="10%" align="center" nowrap="nowrap"><span id="sprytextfield7">
<input name="ssn3" type="text" id="ssn3" onkeyup="return autoTab(this, 4, event)" size="4" maxlength="4" /><br />
<span class="textfieldRequiredMsg">A value is required.</span></span></td>
</tr>
</table></td>
<td><table width="100%" border="0" cellpadding="5">
<tr>
<th height="34" align="right" nowrap="nowrap">DATE OF BIRTH<sup>*</sup></th>
<td align="center" nowrap="nowrap"><span id="spryselect2">
<label for="dobmo"></label>
<select name="dobmo" id="dobmo">
<option selected="selected">MONTH</option>
<option value="January">January</option>
<option value="February">February</option>
<option value="March">March</option>
<option value="April">April</option>
<option value="May">May</option>
<option value="June">June</option>
<option value="July">July</option>
<option value="August">August</option>
<option value="September">September</option>
<option value="October">October</option>
<option value="November">November</option>
<option value="December">December</option>
</select><br />
<span class="selectRequiredMsg">Please select an item.</span></span></td>
<td align="center" nowrap="nowrap"><span id="spryselect3">
<label for="dobday"></label>
<select name="dobday" id="dobday">
<option selected="selected">DAY</option>
<option value="1">01</option>
<option value="2">02</option>
<option value="3">03</option>
<option value="4">04</option>
<option value="5">05</option>
<option value="6">06</option>
<option value="7">07</option>
<option value="8">08</option>
<option value="9">09</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
<option value="16">16</option>
<option value="17">17</option>
<option value="18">18</option>
<option value="19">19</option>
<option value="20">20</option>
<option value="21">21</option>
<option value="22">22</option>
<option value="23">23</option>
<option value="24">24</option>
<option value="25">25</option>
<option value="26">26</option>
<option value="27">27</option>
<option value="28">28</option>
<option value="29">29</option>
<option value="30">30</option>
<option value="31">31</option>
</select><br />
<span class="selectRequiredMsg">Please select an item.</span></span></td>
<td align="center" nowrap="nowrap"><span id="sprytextfield6">
<label for="dobyr"></label>
<input name="dobyr" type="text" id="dobyr" onkeyup="return autoTab(this, 4, event)" size="4" maxlength="4" /><br />
<span class="textfieldRequiredMsg">A value is required.</span></span></td>
</tr>
</table></td>
</tr>
</table>
<br />
<table width="100%" border="0" cellpadding="5">
<tr>
<td width="38%">Are you 18 or older? <sup>*</sup></td>
<td width="10%" nowrap="nowrap"><span id="spryselect4">
<label for="age"></label>
<select name="age" id="age">
<option selected="selected">SELECT</option>
<option value="Yes">Yes</option>
<option value="No">No</option>
</select><br />
<span class="selectRequiredMsg">Please select an item.</span></span></td>
<th width="6%">&nbsp;</th>
<td width="38%">Are you a U.S. citizen? <sup>*</sup></td>
<td width="10%" nowrap="nowrap"><span id="spryselect6">
<label for="uscit"></label>
<select name="uscit" id="uscit">
<option selected="selected">SELECT</option>
<option value="Yes">Yes</option>
<option value="No">No</option>
</select><br />
<span class="selectRequiredMsg">Please select an item.</span></span></td>
</tr>
<tr>
<td width="38%">Are you your own legal guardian? <sup>*</sup></td>
<td width="10%" nowrap="nowrap"><span id="spryselect5">
<label for="guardian"></label>
<select name="guardian" id="guardian">
<option selected="selected">SELECT</option>
<option value="Yes">Yes</option>
<option value="nO">No</option>
</select><br />
<span class="selectRequiredMsg">Please select an item.</span></span></td>
<th width="6%">&nbsp;</th>
<td width="38%">Are you authorized to
work in New Hampshire? <sup>*</sup></td>
<td width="10%" nowrap="nowrap"><span id="spryselect7">
<label for="nh"></label>
<select name="nh" id="nh">
<option selected="selected">SELECT</option>
<option value="Yes">Yes</option>
<option value="No">No</option>
</select><br />
<span class="selectRequiredMsg">Please select an item.</span></span></td>
</tr>
</table>
<br /> <div align="right">
<input type="submit" value="Next" />
</div>
<table width="50%" border="1" cellpadding="0">
<tr align="center"> </tr>
</table>
</form>

dcrandall

6:19 pm on Mar 9, 2011 (gmt 0)

10+ Year Member



second form;

 <?php

session_start();

session_register('title');
session_register('last');
session_register('first');
session_register('innitial');
session_register('suffix');
session_register('ssn');
session_register('dobmo');
session_register('dobday');
session_register('dobyr');
session_register('age');
session_register('uscit');
session_register('guardian');
session_register('nh');

$_SESSION['title'] = $_POST['title'];
$_SESSION['last'] = $_POST['last'];
$_SESSION['first'] = $_POST['first'];
$_SESSION['innitial'] = $_POST['innitial'];
$_SESSION['Suffix'] = $_POST['suffix'];
$_SESSION['ssn'] = $_POST['ssn'];
$_SESSION['dobmo'] = $_POST['dobmo'];
$_SESSION['dobday'] = $_POST['dobday'];
$_SESSION['dobyr'] = $_POST['dobyr'];
$_SESSION['age'] = $_POST['age'];
$_SESSION['uscit'] = $_POST['uscit'];
$_SESSION['guardian'] = $_POST['guardian'];
$_SESSION['nh'] = $_POST['nh'];
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<link href="../../css/onscreecn.css" rel="stylesheet" type="text/css" />
<script src="../../javascript/highlight-active-input.js.js" type="text/javascript"></script>
<script src="../../javascript/autoTab.js" type="text/javascript"></script>
<script src="../../javascript/SpryValidationSelect.js" type="text/javascript"></script>
<script src="../../javascript/dFilter.js" type="text/javascript"></script>
<script src="../../javascript/SpryValidationTextField.js" type="text/javascript"></script>
<link href="../../css/SpryValidationTextField.css" rel="stylesheet" type="text/css" />
<link href="../../css/SpryValidationSelect.css" rel="stylesheet" type="text/css" />


</head>
<body>
<form method="post" action="position.php">
<h2>section i: personal information</h2>

<h4>Contact Information:</h4>
<table width="100%" border="1" cellpadding="5">
<tr>
<td width="50%"><h4>Home/Physical Address:</h4>
<table width="100%">
<tr>
<td width="45%"><div align="left"><span id="sprytextfield1">
<input name="ship1" id="ship1" type="text" onchange="copyValue(this)" onkeydown="if(event.keyCode==13) event.keyCode=9;" onkeyup="return autoTab(this, 15, event)" size="25" /><sup>*</sup><br />
<span class="textfieldRequiredMsg">A value is required.</span></span></div></td>
<td width="10%">&nbsp;</td>
<td width="45%"><div align="left"><span id="sprytextfield2">
<input name="ship2" id="ship2" type="text" onchange="copyValue(this)" onkeydown="if(event.keyCode==13) event.keyCode=9;" onkeyup="return autoTab(this, 15, event)" size="25" maxlength="25" />
</span></div></td>
</tr>
</table> <table width="100%" border="0" cellpadding="0" class="MsoNormalTable">
<tr>
<td height="26"><div><span id="sprytextfield3">
<input name="shipcity" type="text" id="shipcity" onchange="copyValue(this)" onkeyup="return autoTab(this, 15, event)"/><sup>*</sup><br />
<span class="textfieldRequiredMsg">A value is required.</span></span></div></td>
<td width="5%">&nbsp;</td>
<td><span id="sprytextfield22">
<input name="shipstate" type="text" id="shipstate" onkeyup="return autoTab(this, 2, event)" size="2" maxlength="2" /><sup>*</sup><br />
<span class="textfieldRequiredMsg">A value is required.</span></span></td>
<td width="5%"></td>
<td width="1%" nowrap="nowrap"><div align="center"><span id="sprytextfield5">
<input name="shipzip" id="shipzip" type="text" onchange="copyValue(this)" onkeydown="if(event.keyCode==13) event.keyCode=9" onkeyup="return autoTab(this, 5, event)" size="5" maxlength="5" /><sup>*</sup><br />
<span class="textfieldRequiredMsg">A value is required.</span></span></div></td>
</tr>
</table></td>
<td width="50%"><h4>Mailing Address: </h4>
<table width="100%">
<tr>
<td width="45%"><span id="sprytextfield13">
<input name="bill1" type="text" id="bill1" onchange="copyValue(this)" onclick="select()" onkeydown="if(event.keyCode==13) event.keyCode=9;" onkeyup="return autoTab(this, 15, event)" size="25" maxlength="25" />
</span></td>
<td width="10%">&nbsp;</td>
<td width="45%"><span id="sprytextfield8">
<input name="bill2" id="bill2" type="text" onchange="copyValue(this)" onkeydown="if(event.keyCode==13) event.keyCode=9;" onkeyup="return autoTab(this, 15, event)" size="25" maxlength="25" />
</span></td>
</tr>
</table>
<table width="100%" border="0" cellpadding="0" class="MsoNormalTable">
<tr></tr>
<tr>
<td height="24"><div align="left"><span id="sprytextfield14">
<input name="billcity" type="text" id="billcity" onchange="copyValue(this)" onclick="select()" onkeyup="return autoTab(this, 15, event)" />
</span></div></td>
<td width="5%">&nbsp;</td>
<td><span id="sprytextfield23">
<input name="billstate" type="text" id="billstate" onkeyup="return autoTab(this, 2, event)" size="2" maxlength="2" />
</span></td>
<td width="5%"></td>
<td width="10%" nowrap="nowrap"><span id="sprytextfield15">
<input name="billzip" type="text" id="billzip" onchange="copyValue(this)" onkeyup="return autoTab(this, 5, event)" size="5" maxlength="5" />
</span></td>
</tr>
</table></td>
</tr>
</table>
<br />
<table width="100%" border="0" cellpadding="5">
<tr>
<th width="23%" nowrap="nowrap" scope="row"> <div align="right"><a href="javascript:explain('Day Phone', 'opener.document.form.username.value', 'Please enter your daytime telephone number with area code. &lt;B&gt;&lt;U&gt;DO NOT&lt;/b&gt;&lt;/u&gt; type any slashes (/), dashes (-), parentheses or spaces. The field has been automatically formatted and the cursor will go to the next field once the maximum limit has been reached');" onmouseover="window.status='Click for explanation...';return true;" onmouseout="window.status='';return true;"> Daytime Phone</a></div></th>
<td width="6%" nowrap="nowrap">( <span id="sprytextfield16">
<input name="dayarea" type="text" id="dayarea" onkeyup="return autoTab(this, 3, event)" size="3" maxlength="3" />
</span> ) </td>
<td><span id="sprytextfield17">
<input name="dayno1" type="text" id="dayno1" onkeyup="return autoTab(this, 3, event)" size="3" maxlength="3" />
</span></td>
<td>-</td>
<td><span id="sprytextfield18">
<input name="dayno2" type="text" id="dayno2" onkeyup="return autoTab(this, 4, event)" size="4" maxlength="4" />
</span></td>
<th width="10%">&nbsp;</th>
<th width="33%"><div align="right"><a href="javascript:explain('Evening Phone', 'opener.document.form.username.value', 'Please enter your evening telephone number with area code. &lt;B&gt;&lt;U&gt;DO NOT&lt;/b&gt;&lt;/u&gt; type any slashes (/), dashes (-), parentheses or spaces. The field has been automatically formatted and the cursor will go to the next field once the maximum limit has been reached');" onmouseover="window.status='Click for explanation...';return true;" onmouseout="window.status='';return true;">Evening Phone</a><sup>*</sup></div></th>
<td width="5%" nowrap="nowrap"> <label for="evephone"></label>
(<span id="sprytextfield4">
<input name="evearea" type="text" id="evearea" onkeyup="return autoTab(this, 3, event)" size="3" maxlength="3" />
)<br />
<span class="textfieldRequiredMsg">A value is required.</span></span></td><td width="3%" nowrap="nowrap"><span id="sprytextfield6">
<input name="eveno1" type="text" id="eveno1" onkeyup="return autoTab(this, 3, event)" size="3" maxlength="3" /><br />
<span class="textfieldRequiredMsg">A value is required.</span></span></td><td width="2%">-</td><td width="9%" nowrap="nowrap"><span id="sprytextfield12">
<input name="eveno2" type="text" id="eveno2" onkeyup="return autoTab(this, 4, event)" size="4" maxlength="4" /><br />
<span class="textfieldRequiredMsg">A value is required.</span></span></td>
</tr></table>
<br />
<table width="100%" border="0" cellpadding="5">
<tr>
<th width="23%" nowrap="nowrap" scope="row"><div align="right"><a href="javascript:explain('Fax Phonee', 'opener.document.form.username.value', 'Please enter your fax number with area code (if applicable). &lt;B&gt;&lt;U&gt;DO NOT&lt;/b&gt;&lt;/u&gt; type any slashes (/), dashes (-), parentheses or spaces. The field has been automatically formatted and the cursor will go to the next field once the maximum limit has been reached');" onmouseover="window.status='Click for explanation...';return true;" onmouseout="window.status='';return true;">Fax Phone</a></div></th>
<td width="6%" nowrap="nowrap"><span id="sprytextfield9">(
<input name="faxarea" type="text" id="faxarea" onkeyup="return autoTab(this, 3, event)" size="3" maxlength="3" />
) </span></td>
<td width="4%"><span id="sprytextfield10">
<input name="faxno1" type="text" id="faxno1" onkeyup="return autoTab(this, 3, event)" size="3" maxlength="3" />
</span></td>
<td width="2%">-</td>
<td width="3%"><span id="sprytextfield11">
<input name="faxno2" type="text" id="faxno2" onkeyup="return autoTab(this, 4, event)" size="4" maxlength="4" />
</span></td>
<th width="10%">&nbsp;</th>
<th width="33%"><div class="hide">
<div align="right"><a href="javascript:explain('Day Phonee', 'opener.document.form.username.value', 'Please enter your daytime telephone number with area code. &lt;B&gt;&lt;U&gt;DO NOT&lt;/b&gt;&lt;/u&gt; type any slashes (/), dashes (-), parentheses or spaces. The field has been automatically formatted and the cursor will go to the next field once the maximum limit has been reached');" onmouseover="window.status='Click for explanation...';return true;" onmouseout="window.status='';return true;">Cell/Other Phone</a></div>
</div></th>
<td width="5%" nowrap="nowrap"><label for="evephone2"></label>
(<span id="sprytextfield19">
<input name="otharea" type="text" id="otharea" onkeyup="return autoTab(this, 3, event)" size="3" maxlength="3" />
)<br />
</span></td>
<td width="3%"><span id="sprytextfield20">
<input name="othno1" type="text" id="othno1" onkeyup="return autoTab(this, 3, event)" size="3" maxlength="3" />
</span></td>
<td width="2%">-</td>
<td width="9%"><span id="sprytextfield21">
<input name="othno2" type="text" id="othno2" onkeyup="return autoTab(this, 4, event)" size="4" maxlength="4" />
<br />
</span></td>
</tr>
</table>
<br />
<table width="100%" border="0" cellpadding="5">
<tr>
<th width="20%" nowrap="nowrap" scope="row"><div align="left" class="hide">
<div align="right">Primary E-mail<sup>*</sup></div>
</div></th>
<td width="25%"><span id="sprytextfield7"><a href="javascript:explain('Day Phone', 'opener.document.form.username.value', 'Please enter your daytime telephone number with area code. &lt;B&gt;&lt;U&gt;DO NOT&lt;/b&gt;&lt;/u&gt; type any slashes (/), dashes (-), parentheses or spaces. The field has been automatically formatted and the cursor will go to the next field once the maximum limit has been reached');" onmouseover="window.status='Click for explanation...';return true;" onmouseout="window.status='';return true;">
<input name="primaryemail" type="text" id="primaryemail" style="text-transform:lowercase" onkeydown="if(event.keyCode==13) event.keyCode=9;" onkeyup="return autoTab(this, 30, event)" size="35" />
</a><br />
<span class="textfieldRequiredMsg">A value is required.</span><span class="textfieldInvalidFormatMsg">Invalid format.</span></span></td>
<th width="10%">&nbsp;</th>
<th width="20%"><div align="right">Alternate E-mail</div></th>
<td><input name="alternateemail" type="text" id="alternateemail" style="text-transform:lowercase" onkeydown="if(event.keyCode==13) event.keyCode=9;" onkeyup="return autoTab(this, 30, event)" size="35" /></td>
</tr>
</table>
<br />
<div class="hide"></div>
<div class="hide">
<table width="50%">
<tr>
<td><div align="right">Perfered Contact Method:</div></td>
<td><p><span id="spryselect2">
<label for="contact"></label>
<select name="contact" id="contact">
<option selected="selected">SELECT</option>
<option value="E-mail">E-Mail</option>
<option value="Fax">Fax</option>
<option value="Mail">Mail</option>
<option value="Phone">Phone</option>
</select>
<span class="selectRequiredMsg">Please select an item.</span></span></p></td>
</tr>
</table>
<div align="right">
<input type="submit" value="Next">
</div>
</div>
</form>

dcrandall

6:22 pm on Mar 9, 2011 (gmt 0)

10+ Year Member



The application actually has several morre pages, but hopefully this is a good idea of what I'm doing.

eelixduppy

7:37 pm on Mar 9, 2011 (gmt 0)



First off, remove the session_register() function calls. Not only are they unnecessary, but the use of that function is depreciated. Secondly, I would check all your error logs for problems starting the session (e.g., due to headers already being sent). If the session isn't starting properly, then that is your problem.

dcrandall

9:16 pm on Mar 9, 2011 (gmt 0)

10+ Year Member



OK, I'm stupid...how can I check the error logs?

IntegrityWebDev

9:38 pm on Mar 9, 2011 (gmt 0)

10+ Year Member



Show us a snipped of the code from the final page where you are trying to display the collected info.

dcrandall

10:00 pm on Mar 9, 2011 (gmt 0)

10+ Year Member



<table width="30%" border="1" align="right">
<tr>
<th width="50%" nowrap="nowrap">
<div align="right">SSN;</div>
<td nowrap="nowrap"><?php echo $_POST['ssn1']; ?>-<?php echo $_POST['ssn2']; ?>-<?php echo $_POST['ssn3']; ?></td>
</tr>
</table>
<p>&nbsp;</p>
<table width="30%" border="1" align="right">
<tr>
<th width="50%" valign="baseline" nowrap="nowrap">
<div align="right">DOB </div>
</th>
<td nowrap="nowrap"><?php echo $_POST['dobmo']; ?>&nbsp;<?php echo $_POST['dobday']; ?>,&nbsp;<?php echo $_POST['dobyr']; ?></td>
</tr>
</table>
<p>&nbsp;</p>
<h2 align="center">Section I: Personal Information</h2>
<h4>Name:</h4>
<table width="50%" border="1" cellpadding="0">
<tr>
<td align="center"><?php echo $_POST['title']; ?></td>
<td><?php echo $_POST['last']; ?></td>
<td style='padding:.75pt .75pt .75pt .75pt'><?php echo $_POST['first']; ?></td>
<td style='padding:.75pt .75pt .75pt .75pt'><p align="center" class="MsoNormal">
<?php echo $_POST['innitial']; ?> </p></td>
<td style='padding:.75pt .75pt .75pt .75pt'><p align="center">
<?php echo $_POST['suffix']; ?> </p></td>
</tr>
<tr>
<td align="center"><div align="center">Title<sup>*</sup></div></td>
<td><div class="hide">
<div align="center">Last<sup>*</sup></div>
</div></td>
<td><div align="center">First<sup>*</sup></div></td>
<td align="center">M.I. </td>
<td align="center">Suffix</td>
</tr>
</table>

Above is what should display the info from the first form. Should i post the php as well?

dcrandall

10:14 pm on Mar 9, 2011 (gmt 0)

10+ Year Member



After enabling error reporting in the php.ini file. i get the following in every field; Warning: main(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/New_York' for '-5.0/no DST' instead in C:\On-site applicants\application\name.php on line 88 Notice: Undefined index: last in C:\On-site applicants\application\name.php on line 88 , Warning: main(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/New_York' for '-5.0/no DST' instead in C:\On-site applicants\application\name.php on line 88 Notice: Undefined index: first in C:\On-site applicants\application\name.php on line 88
of course, different line numbers

IntegrityWebDev

12:15 am on Mar 10, 2011 (gmt 0)

10+ Year Member



I'm not sure about your time zone thing but your code says this:
<?php echo $_POST['ssn1']; ?>


Shouldn't it say this:
<?php echo $_SESSION['ssn1']; ?>

dcrandall

1:22 am on Mar 10, 2011 (gmt 0)

10+ Year Member



Nope...that didn't work either.

IntegrityWebDev

1:51 pm on Mar 10, 2011 (gmt 0)

10+ Year Member



I dont see where it would make a difference but did you try setting the timezone...there is a way to do that within your code.

dcrandall

6:07 pm on Mar 11, 2011 (gmt 0)

10+ Year Member



I tried setting iit in the php.ini filem but it made no diferance.. I'm getting so darn frustrated with my inability to get the hang of this, that I'm ready to raise the white flag!

sundaridevi

10:19 am on Mar 15, 2011 (gmt 0)

10+ Year Member



There are a lot of little problems here. Like you can't use $_SESSION and session_register in the same script. As stated above, it's best to use $_SESSION

Also, I'm not sure what you're doing but the array $_POST only lasts until the next form is posted, so if dobmo is submitted on page 2 and there are more than 2 pages, then you can't access it with $_POST on the last page. Also it is useful to know that $_POST cannot overwrite variables that are already stored in $_SESSION

So probably best to take a look at
[php.net...]

and review the different things.

usmc wlh1975

4:10 am on Mar 17, 2011 (gmt 0)

10+ Year Member



I would use hidden fields throughout, that is a sure-fire way of getting the data from page to page.

Instead of passing things by session, I would stick previous page values into fields which have the hidden type. That way they are passed back during each subsequent submit until you reach the final page and then you can stick them in the table to display them.

You can also use a multi-page form by using ajax to pass your information to php scripts for validation or what have you and passing back the results by using the technique of adding a script member to the document.

function attach_file( p_script_url ) {
// create new script element, set its relative URL, and load it
script = document.createElement( 'script' );
script.type = "text/javascript";
script.src = p_script_url;
document.getElementsByTagName( 'head' )[0].appendChild( script );
}

if (window.XMLHttpRequest){
var http_req=new XMLHttpRequest(); // code for IE7+, Firefox, Chrome, Opera, Safari
var http_req2=new XMLHttpRequest(); // code for IE7+, Firefox, Chrome, Opera, Safari
var http_req3=new XMLHttpRequest(); // code for IE7+, Firefox, Chrome, Opera, Safari
} else {
var http_req=new ActiveXObject("Microsoft.XMLHTTP"); // code for IE6, IE5
var http_req2=new ActiveXObject("Microsoft.XMLHTTP"); // code for IE6, IE5
var http_req3=new ActiveXObject("Microsoft.XMLHTTP"); // code for IE6, IE5
}
function handlePost(sendString)
{
var oStr='ID' + encodeURI(UIF_ID) + '&field_1=' + encodeURI(document.getElementById('field_1').value) + "'&field_2='" + encodeURI(document.getElementById('field_2').value) + "'&field_3='" + encodeURI(document.getElementById('field_3').value) + "'&field_4='" + encodeURI(document.getElementById('field_4').value) + "'&field_5='" + encodeURI(document.getElementById('field_5').value) + "'&field_6='" + encodeURI(document.getElementById('field_6').value) + "'&field_7='" + encodeURI(document.getElementById('field_7').value) + "'&field_8='" + encodeURI(document.getElementById('field_8').value) + "'&field_9='" + encodeURI(document.getElementById('field_9').value) + "'&field_10='" + encodeURI(document.getElementById('field_10').value) + "'&field_11='" + encodeURI(document.getElementById('field_11').value) + "'&field_12='" + encodeURI(document.getElementById('field_12').value) + "'&field_14='" + encodeURI(sendString)+ "'&field_15='" + encodeURI(document.getElementById('field_15').value) + "'&field_22='" + encodeURI(document.getElementById('field_15').value) + "'&field_23='" + encodeURI(document.getElementById('field_23').value) + "'&field_24='" + encodeURI(document.getElementById('field_24').value) + "'&field_25='" + encodeURI(document.getElementById('field_25').value) + "'&field_26='" + encodeURI(document.getElementById('field_26').value) + "'&field_27='" + encodeURI(document.getElementById('field_27').value) + "'";

http_req.open("POST","edit_processor.php",false);
http_req.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
http_req.setRequestHeader("Content-length", oStr.length);
http_req.setRequestHeader("Connection", "close");
http_req.send(oStr);
var myResponse=http_req.responseText;

if(myResponse=="SUCCESS")
return true;
else {
alert(myResponse+": Please contact site administrator!");
return false;
}

return false;
}