In a php script I'm using the Registration page only had fields for name and email address, basically. I added fields, just by copying the code on the page. I added Address1, Address2, City and State. Then I added those fields to the mysql db.
However, I need help with two things, when I Submit, and some field happens to be incomplete an error message appears and asks the user to complete. All fields remain filled, except the ones I added. How to I keep my just-added-fields populated, like the rest of the fields?
And secondly, when I tested my additions, by registering, my newly added fields info, didn't get added to the db.
Your help will be appreciated.
<div class="signup-right">
<h1 style="border-bottom: 1px solid #666666;">[var.lang_register_today]!</h1>
<form action="join.php" method="post" name="capform" class="FormGeneric" onSubmit="return capCheck(this);">
<div>
<div style="margin-left:52px; float:left;">
<b>[var.lang_first_name]:</b>
</div>
<div style="margin-right:50px; float:right;">
<input type="text" name="first_name" size="20" value="[var.first_name]" />
</div>
</div>
<br />
<br />
<div>
<div style="margin-left:52px; float:left;">
<b>[var.lang_last_name]:</b>
</div>
<div style="margin-right:50px; float:right;">
<input type="text" name="last_name" size="20" value="[var.last_name]" />
</div>
</div>
<br />
<br />
<div>
<div style="margin-left:52px; float:left;">
<b>Address 1:</b>
</div>
<div style="margin-right:50px; float:right;">
<input type="text" name="address_1" size="26" value="[var.Address_1]" />
</div>
</div>
<br />
<br />
<div>
<div style="margin-left:52px; float:left;">
<b>Address 2:</b>
</div>
<div style="margin-right:50px; float:right;">
<input type="text" name="address_2" size="26" value="[var.Address_2]" />
</div>
</div>
<br />
<br />
<div>
<div style="margin-left:52px; float:left;">
<b>City:</b>
</div>
<div style="margin-right:50px; float:right;">
<input type="text" name="city" size="26" value="[var.city]" />
</div>
</div>
<br />
<br />
<div>
<div style="margin-left:52px; float:left;">
<b>State/Province:</b>
</div>
<div style="margin-right:50px; float:right;">
<input type="text" name="state" size="26" value="[var.state]" />
</div>
</div>
<br />
<br />
<div>
<div style="margin-left:52px; float:left;">
<b>Zip Code/Mail Code:</b>
</div>
<div style="margin-right:110px; float:right;">
<input type="text" name="zip_code" size="6" maxlength="5" value="[var.zip_code]" />
</div>
</div>