Hello i am making a register page for a website. anyways i keep on getting a parse error that says:
Parse error: parse error in C:\wamp\www\register improved\index.php on line 102
And the entire code i have so far is
<?php
include "functions.php";
?>
<html>
<head>
<title>
Register Form Improved
</title>
</head>
<body>
<center>
<form method="POST" action="index.php">
<table border="0" style="width: 250; text-align: left; border: 1px solid black; padding: 2px; font-family: Tahoma; font-size: 12px;">
<tr>
<td>
Username:
</td>
<td>
<input type="text" name="username">
</td/
</tr>
<tr>
<td>
Password:
</td>
<td>
<input type="password" name="password">
</td>
</tr>
<tr>
<td>
Gender:
</td>
<td>
<select name="gender">
<option value="Male">Male</option>
<option value="Female">Female</option>
</select>
</td>
</tr>
<tr>
<td>
Birth year:
</td>
<td>
<select name="birth_year">
<?php
$num = 1899;
while($num <= 2009) {
$num ++;
echo "<option value=".$num.">".$num."</option>";
}
?>
</select>
</td>
</tr>
<tr>
<td colspan="2" align="center">
<input type="submit" name="submit" value="submit">
</td>
</tr>
</table>
</form>
<?php if(@$_POST['submit']) { ?>
<table border="0" style="color: red; width: 250; margin-top: 5px; border: 1px soild black; padding: 2px; font-family: Tahoma; font-family: 12px;">
<?php
$curnum = 0;
$username = $_POST['username'];
$password = $_POST['password'];
$gender = $_POST['gender'];
$byear = $_POST['birth_year'];
if(!$username) {
$curnum ++;
echo "<tr><td>".$curnum.". Please enter a username.<td></tr>";
}
if(!$password) {
$curnum ++;
echo "<tr><td>".$curnum.". Please enter a password.<td></tr>";
}
if($username) {
if(strlen($username) > 20) {
$curnum ++;
echo "<tr><td>".$curnum.". Your username is too long! (3-20 letters).<td></tr>";
} if($username) {
if(strlen($username) < 3) {
$curnum ++;
echo "<tr><td>".$curnum.". Your username is too short! (3-20 letters).<td></tr>";
}
}
?>
</table><?php } ?>
</center>
</body>
</html>
so on line 102 it says </html> i see nothing wrong with it what could be my problem
Parse error: parse error in C:\wamp\www\register improved\index.php on line 102
And the entire code i have so far is
<?php
include "functions.php";
?>
<html>
<head>
<title>
Register Form Improved
</title>
</head>
<body>
<center>
<form method="POST" action="index.php">
<table border="0" style="width: 250; text-align: left; border: 1px solid black; padding: 2px; font-family: Tahoma; font-size: 12px;">
<tr>
<td>
Username:
</td>
<td>
<input type="text" name="username">
</td/
</tr>
<tr>
<td>
Password:
</td>
<td>
<input type="password" name="password">
</td>
</tr>
<tr>
<td>
Gender:
</td>
<td>
<select name="gender">
<option value="Male">Male</option>
<option value="Female">Female</option>
</select>
</td>
</tr>
<tr>
<td>
Birth year:
</td>
<td>
<select name="birth_year">
<?php
$num = 1899;
while($num <= 2009) {
$num ++;
echo "<option value=".$num.">".$num."</option>";
}
?>
</select>
</td>
</tr>
<tr>
<td colspan="2" align="center">
<input type="submit" name="submit" value="submit">
</td>
</tr>
</table>
</form>
<?php if(@$_POST['submit']) { ?>
<table border="0" style="color: red; width: 250; margin-top: 5px; border: 1px soild black; padding: 2px; font-family: Tahoma; font-family: 12px;">
<?php
$curnum = 0;
$username = $_POST['username'];
$password = $_POST['password'];
$gender = $_POST['gender'];
$byear = $_POST['birth_year'];
if(!$username) {
$curnum ++;
echo "<tr><td>".$curnum.". Please enter a username.<td></tr>";
}
if(!$password) {
$curnum ++;
echo "<tr><td>".$curnum.". Please enter a password.<td></tr>";
}
if($username) {
if(strlen($username) > 20) {
$curnum ++;
echo "<tr><td>".$curnum.". Your username is too long! (3-20 letters).<td></tr>";
} if($username) {
if(strlen($username) < 3) {
$curnum ++;
echo "<tr><td>".$curnum.". Your username is too short! (3-20 letters).<td></tr>";
}
}
?>
</table><?php } ?>
</center>
</body>
</html>
so on line 102 it says </html> i see nothing wrong with it what could be my problem