I am having trouble figuring out why no matter what the address and city fields are always null for me. I input any basic data, post it and get on the other side and it says it's null. Anything obvious I'm doing wrong? Thanks in advance.
This is how I get the values passed via post:
$username = $_POST['username'];
$password = $_POST['password'];
$email = $_POST['email'];
$fname = $_POST['fname'];
$lname = $_POST['lname'];
$phone = $_POST['phone'];
$address_one = $_POST['address_one'];
$address_two = $_POST['address_two'];
$city = $_POST['city'];
$age = $_POST['age'];
Form I use to collect the data:
<form id='login' action='createreg.php' method='post' accept-charset='UTF-8'>
<h3>Create an Account</h3>
<table id='registertb'>
<tr>
<td>Username:</td>
<td>
<input type='text' name='username' id='username' class='loginfield' maxlength="50" />
</td>
</tr>
<tr>
<td>Password:</td>
<td>
<input type='password' name='password' id='password' class='loginfield' maxlength="50" />
</td>
</tr>
<tr>
<td>Email:</td>
<td>
<input type='text' name='email' id='email' class='loginfield' maxlength="50" />
</td>
</tr>
<tr>
<td>First Name:</td>
<td>
<input type='text' name='fname' id='fname' class='loginfield' maxlength="50" />
</td>
</tr>
<tr>
<td>Last Name:</td>
<td>
<input type='text' name='lname' id='lname' class='loginfield' maxlength="50" />
</td>
</tr>
<tr>
<td>Phone:</td>
<td>
<input type='text' name='phone' id='phone' class='loginfield' maxlength="50" />
</td>
</tr>
<tr>
<td>Address Line 1:</td>
<td>
<input type='text' name='address1' id='address1' class='loginfield' maxlength="50" />
</td>
</tr>
<tr>
<td>Address Line 2:</td>
<td>
<input type='text' name='address2' id='address2' class='loginfield' maxlength="50" />
</td>
</tr>
<tr>
<td>City:</td>
<td>
<input type='text' name='address2' id='address2' class='loginfield' maxlength="50" />
</td>
</tr>
<tr>
<td>Age:</td>
<td>
<input type='text' name='age' id='age' class='loginfield' maxlength="50" />
</td>
</tr>
<tr>
<td><a href='index.html'>Login</a></td>
<td align='right'>
<input type='submit' id='subbutton' value='Create' class='buttons' />
</td>
</tr>
</table>