Can anyone spot my problem? I sure can't. The thing it's NOT doing is.. submitting ANY informaton to the database.
<?php
if(isset($_POST['submit'])) {
$aim = $_POST['aim'];
$email = $_POST['email'];
$email = stripslashes(trim($email));
$email = htmlentities($email);
$home = $_POST['home'];
$icq = $_POST['icq'];
$jon = $_POST['job'];
$msn = $_POST['msn'];
$password = $_POST['password'];
$password = stripslashes(trim($password));
$password = nl2br($password);
$password = htmlentities($password);
$username = $_POST['username'];
$username = stripslashes(trim($username));
$username = nl2br($username);
$username = htmlentities($username);
$yahoo = $_POST['yahoo'];
if ($password != $password2) {
die('<div align="center">Your passwords did not match and could not be verified<br>Please go back and try <a href="index.php?page=register">again</a></div>');
}
if(eregi("[^a-z0-9_]", $username)) {
die('<div align="center">Invalid characters in the username. You can only use letters, numbers and the underscore character.<br>Please go back and try <a href="index.php?page=register">again</a>!</div>');
}
$register_ip = $HTTP_SERVER_VARS["REMOTE_ADDR"];
$q = "SELECT * FROM members WHERE name = '$username'";
$r = mysql_query($q);
if (mysql_num_rows($r)) { //username exists
echo "<div align='center'><font color='red'>That username already exists. Please choose another.</font></div>";
} else { //doesnt exist
$query = "INSERT INTO members (name, password, email, register_ip, icq, aim, msn, yahoo, home, job)
VALUES ('$username', '$password', '$email', '$register_ip', '$email', '$icq', '$aim', '$msn', '$yahoo', '$home', '$job')";
mysql_query($query);
echo "<div align='center'>Your registration was submitted! Please <a href='login.php'>Login</a></div><br><br>";
}
}
include("W:/www/modulization/templates/register_top.php");
include("W:/www/modulization/templates/register.php");
include("W:/www/modulization/templates/register_bottom.php");
?>
Template includes version (The only one that matters anyways)
<tr>
<form method='post' action="<? $_SERVER['php_self']?>?page=register">
<td class='forumcell2' width='20%'>Username</td>
<td class='forumcell2' width='80%'><input name="username" MAXLENGTH="20"> Enter a username up to 20 characters.</td>
</tr>
<tr>
<td class='forumcell2' width='20%'>Password</td>
<td class='forumcell2' width='80%'><input name="password" MAXLENGTH="16" type='password'> Enter a password up to 16 characters.</td>
</tr>
<tr>
<td class='forumcell2' width='20%'>Verify Password</td>
<td class='forumcell2' width='80%'><input name="password2" MAXLENGTH="16" type='password'> Enter the same password as before.</td>
</tr>
<tr>
<td class='forumcell2' width='20%'>Email</td>
<td class='forumcell2' width='80%'><input name="email" MAXLENGTH="25"> Enter your email address.</td>
</tr>
<tr>
<td class='forumcell' width='100%' colspan='2'><b>Profile Information</b></td>
</tr>
<tr>
<td class='forumcell2' width='20%'>ICQ number</td>
<td class='forumcell2' width='80%'><input name="icq" MAXLENGTH="9"> Enter your ICQ number (9 chars or less).</td>
</tr>
<tr>
<td class='forumcell2' width='20%'>AIM Nickname</td>
<td class='forumcell2' width='80%'><input name="aim"> Enter your AIM Nickname.</td>
</tr>
<tr>
<td class='forumcell2' width='20%'>MSN Nickname</td>
<td class='forumcell2' width='80%'><input name="msn"> Enter your MSN Nickname.</td>
</tr>
<tr>
<td class='forumcell2' width='20%'>Yahoo Nickname</td>
<td class='forumcell2' width='80%'><input name="yahoo"> Enter your Yahoo Nickname.</td>
</tr>
<tr>
<td class='forumcell2' width='20%'>Hometown</td>
<td class='forumcell2' width='80%'><input name="home"> Enter your Hometown.</td>
</tr>
<tr>
<td class='forumcell2' width='20%'>Occupation</td>
<td class='forumcell2' width='80%'><input name="job"> Enter your Occupation.</td>
</tr>
<tr>
<td colspan='2' class='forumcell' width='100%' align='center'><input type='submit' name='submit' value='Register'></td>
</tr>
</form>