lol meant to say wasnt asking for you to look for errors, but ill post the code in a minute when i get back up to my computer (downstairs right now). im sorry if i have to double post, but it wont let me edit my posts after i finish posting them.
EDIT:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "<a rel="nofollow" href="http://www.w3.org/TR/html4/loose.dtd" target="_blank">http://www.w3.org/TR/html4/loose.dtd</a>">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Register!</title>
</head>
<body>
<table bordercolor="000000" border="1" cellpadding="0" cellspacing="0">
<tr bgcolor="#C8D6E0">
<td colspan="2" align="center" height="180">
This will be the location of any banners and such
</td>
</tr>
<tr>
<td height="800" width="150" bgcolor="C8D6E0">
This will Contain Information pertaining to the site (IE SITE NAV)
</td>
<td valign="top" width="800" bgcolor="#70899f">
<form method="post" action="new_user.php">
<input type="hidden" name="id" id="id" value="null">
<table width="800" border="0" cellpadding="0" cellspacing="0">
<tr>
<td colspan="2" align="center" bgcolor="#535d6f">
<font size="+1" color="ffffff">
<p align="left"><b>Registration Info:</b>
<font size="-">
All feilds required except those marked with an *
</font></p>
</font>
</td>
</tr>
<tr>
<td align="left" bgcolor="70899f">
<font color="#ffffff">
<p><b>User Name:</b></p>
</font>
</td>
<td align="left" bgcolor="70889f">
<input type="text" name="usr_name" id="usr_name">
</td>
</tr>
<tr>
<td align="left" bgcolor="70899f">
<font color="ffffff">
<b>Password:</b>
</font>
<font size="-1" color="ffffff">passwords are case sensative:</font>
</td>
<td align="left" bgcolor="70889f">
<input type ="password" name="usr_pass" id="usr_pass">
</td>
</tr>
<tr>
<td align="left" bgcolor="70899f">
<font color="ffffff">
<b>Confirm Password:</b>
<font size="-1" color="ffffff">passwords are case sensative:</font>
</font>
</td>
<td align="left" bgcolor="70889f">
<input type ="password" name="con_usr_pass" id="con_usr_pass">
</td>
</tr>
<tr>
<td align="left" bgcolor="70899f">
<font color="#ffffff">
<p><b>E-Mail:</b></p>
</font>
</td>
<td align="left" bgcolor="70889f">
<input type="text" name="email" id="email">
</td>
</tr>
<tr>
<td align="left" bgcolor="70899f">
<font color="#ffffff">
<p><b>Confirm E-Mail:</b></p>
</font>
</td>
<td align="left" bgcolor="70889f">
<input type="text" name="con_email" id="con_email">
</td>
</tr>
<tr>
<td align="left" bgcolor="70889f">
<font color="#ffffff">
<p><b>Gender:</b></p>
</font>
</td>
<td align="left" bgcolor="70889f">
<select name="gender" id="gender">
<option id="unknown">Unknown</option>
<option id="male">Male</option>
<option id="female">Female</option>
</select>
</td>
</tr>
<tr>
<td align="left" bgcolor="70899f">
<font color="#ffffff">
<p><b>DOB:</b></p>
</font>
</td>
<td align="left" bgcolor="70889f">
<select name="month" id="month">
<option id="1">Jan</option>
<option id="2">Feb</option>
<option id="3">Mar</option>
<option id="4">Apr</option>
<option id="5">May</option>
<option id="6">Jun</option>
<option id="7">Jul</option>
<option id="8">Aug</option>
<option id="9">Sep</option>
<option id="10">Oct</option>
<option id="11">Nov</option>
<option id="12">Dec</option>
</select>
<select name="day" id="day">
<option id="1">1</option>
<option id="2">2</option>
<option id="3">3</option>
<option id="4">4</option>
<option id="5">5</option>
<option id="6">6</option>
<option id="7">7</option>
<option id="8">8</option>
<option id="9">9</option>
<option id="10">10</option>
<option id="11">11</option>
<option id="12">12</option>
<option id="13">13</option>
<option id="14">14</option>
<option id="15">15</option>
<option id="16">16</option>
<option id="17">17</option>
<option id="18">18</option>
<option id="19">19</option>
<option id="20">20</option>
<option id="21">21</option>
<option id="22">22</option>
<option id="23">23</option>
<option id="24">24</option>
<option id="25">25</option>
<option id="26">26</option>
<option id="27">27</option>
<option id="28">28</option>
<option id="29">29</option>
<option id="30">30</option>
<option id="31">31</option>
</select>
<input type="text" name="year" id="year" maxlength="4" size="4">
</td>
</tr>
<tr>
<td align="left" bgcolor="70889f">
<font color="#ffffff">
<p><b>Alternate E-Mail:<i>*</i></b></p>
</font>
</td>
<td align="left" bgcolor="70889f">
<input type="text" name="alt_email" id="alt_email">
</td>
</tr>
<tr>
<td align="left" valign="top" bgcolor="70889f">
<font color="ffffff">
<p><b>Interests:*</b></p>
</font>
</td>
<td align="left" bgcolor="70889f">
<textarea rows="5" cols="20" name="interests" id="interests">200 character max</textarea>
</td>
</tr>
<tr>
<td align="left" valign="top" bgcolor="70889f">
<font color="ffffff">
<p><b>Hobbies:*</b></p>
</font>
</td>
<td align="left" bgcolor="70889f">
<textarea rows="5" cols="20" name="hobbies" id="hobbies">200 charcater max</textarea>
</td>
</tr>
<tr>
<td colspan="2" align="center" valign="top" bgcolor="70889f">
<input type="submit">
</td>
</tr>
</table>
</form>
</td>
</tr>
</table>
</body>
</html>
heres the PHP that submits into the database, but is supposed to first check to see if the name has already or not already been used. ive left that part in the comment.
[php]
<?php
$DBhost = "localhost";//location of mySQL on server/site
$DBuser = "michael";//User name for logging onto mySQL
$DBpass = "";//Password for logging onto mySQL
$DBName = "registration";//Name of the databse for logging into
$Table = "reg_info";//Name of the Table to be used steps to create are included
$usr_name = "$_POST[usr_name]";//Name that the person gave on the form
$usr_pass = "$_POST[usr_pass]";//Password use uses
$con_usr_pass = "$_POST[con_usr_pass]";//confirmation of the password
$email = "$_POST[email]";//users email
$con_email = "$_POST[con_email]";//confirmation of the email
$gender = "$_POST[gender]";//their gender
$month = "$_POST[month]";//month they were born
$day = "$_post[day]";//day they were born
$year = "$_POST[year]";//year they were born
$alt_email = "$_POST[alt_email]";//any alternate emails they might use
$interests = "$_POST[interests]";//their interests
$hobbies = "$_POST[hobbies]";//their hobbies
mysql_connect($DBhost,$DBuser,$DBpass) or die("Unable to connect to database"); //connecting to the database using the variable set
@mysql_select_db("$DBName") or die("Unable to select database $DBName"); //at connection to the databse select DBNAME (phpforms) or tell that it couldnt connect
$sqlquery = "SEARCH * FROM $Table WHERE usr_name = '$_POST[usr_name]'";
$results = mysql_query($sqlquery);
if ($results = $usr_name)
//(!$results)
echo "sorry that user name has been taken! please use your browsers back button and try a different one!";
//echo (mysql_error());
else
{
mysql_close();
if ($usr_pass != $con_usr_pass)
echo "sorry the passwords to not match, please use your browsers back button to fix this error";
else
{
if ($email != $con_email)
echo "sorry the Emails you provided do not match, please use your browsers back button to fix this error";
else
{
mysql_connect($DBhost,$DBuser,$DBpass) or die("Unable to connect to database"); //connecting to the database using the variable set
@mysql_select_db("$DBName") or die("Unable to select database $DBName"); //at connection to the databse select DBNAME (phpforms) or tell that it couldnt connect
$sqlquery = "INSERT INTO $Table VALUES('$id','$usr_name','$usr_pass','$email','$gender','$month','$_POST[day]','$year','$alt_email','$interests','$hobbies')";
$results = mysql_query($sqlquery); //query the results
mysql_close();
echo "Information has been submitted into the database!";
}
}
}
?>
[/php]
i dont get any errors, i always get the if in the first if statment, saying that the username is taken when in fact its not. ive tried swaping the Search for Select in the mysql part.