Parse error in php register page need help!!!!!!!!!!!!!!!!?

Jacob

New member
Ok i'm trying to make a php register page when I preview it it says

Notice: Undefined index: submit in C:\wamp\www\register improved\index.php on line 71

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="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>
<table border="0" style="margin-top: 5px; border: 1px soild black; padding: 2px; font-family: Tahoma; font-family: 12px;">
<tr>
<td>
<?php
if($_POST['submit']) {
echo "You clicked submit";
}
?>
</td>
</tr>
</table>
</table>
</center>

</body>
</html>

on line 71 it says: if($_POST['submit']) {

I'm not sure whats causing this error

also here is some extra details if needed

i'm using notepad++ (i don't think this would matter but just in case it does I am telling you)

Please help!!!!!
 
Back
Top