Hi, so I'm trying to make a basic registration and everything shows up in the database (phpMyAdmin) except the password
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<?php
$con = mysql_connect("localhost","root","");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("sportcourt", $con);
$sql="INSERT INTO user (firstname, lastname, password, email, month, day, year)
VALUES
('$_POST[fname]','$_POST[lname]','$_POST[password]','$_POST[email]','$_POST[month]','$_POST[day]','$_POST[year]')";
if (!mysql_query($sql,$con))
{
die('Error: ' . mysql_error());
}
echo "1 record added";
mysql_close($con);
?>
This code is HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<form action="insert.php" method="post" class="registration_form">
<fieldset>
<legend>Registration Form </legend>
<p>Create A new Account <span style="background:#EAEAEA none repeat scroll 0 0;line-height:1;margin-left:210px;;padding:5px 7px;">
Already a member? <a href="login.php">Log in</a></span> </p>
<table align=right>
<div class="elements">
<tr>
<label for="name">First Name :</label>
<input type="text" id="fname" name="fname" size="25" /><br />
<label for="name">Last Name :</label>
<input type="text" id="lname" name="lname" size="25" /><br />
<label for="email">E-mail :</label>
<input type="text" id="email" name="email" size="25" /><br />
<label for="password">Password :</label>
<input type="password" id="password" name="password" size="25" /><br />
<label for="Pass2">Confirm Password :</label>
<input type="password" id="Pass2" name="Pass2" size="25" /><br />
<label for="Birthday">Birth Date:</label>
<select name="month">
<option value="default">Month:</option>
<option value="01">1</option>
<option value="02">2</option>
<option value="03">3</option>
<option value="04">4</option>
<option value="05">5</option>
<option value="06">6</option>
<option value="07">7</option>
<option value="08">8</option>
<option value="09">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
</select>
<select name="day">
<option value="default">Day:</option>
<option value="01">1</option>
<option value="02">2</option>
<option value="03">3</option>
<option value="04">4</option>
<option value="05">5</option>
<option value="06">6</option>
<option value="07">7</option>
<option value="08">8</option>
<option value="09">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
<option value="16">16</option>
<option value="17">17</option>
<option value="18">18</option>
<option value="19">19</option>
<option value="20">20</option>
<option value="21">21</option>
<option value="22">22</option>
<option value="23">23</option>
<option value="24">24</option>
<option value="25">25</option>
<option value="26">26</option>
<option value="27">27</option>
<option value="28">28</option>
<option value="29">29</option>
<option value="30">30</option>
<option value="31">31</option>
</select>
<input type="text" id="year" name="year" size="4" value="Year"/>
</div>
<div class="submit">
<input type="hidden" name="formsubmitted" value="TRUE" />
<input type="submit" value="Register" />
</div>
</table>
</fieldset>
</form>
</body>
</html>