When I try to execute this is AND getting the following error:
Error: Incorrect integer value: 'Age' for column 'age' at row 1
MYSQL --> I have created a database abc inside created a table with name ee and in the table i have created a field "age", type - "INT" , Length - 10 , Default - NULL
Can SOME ONE PLEASE HELP WHY I AM GETTING THIS ERROR - Incorrect integer value: 'Age' for column 'age' at row 1
<html>
<body>
<form action="test5.php" method="post">
Age: <input type="text" name="age" />
<input type="submit" />
</form>
</body>
</html>
test5.php ( Page )
$Age= $_POST[ age ] ;
echo $age;
$con = mysql_connect("localhost","root","***");
if( !$con )
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("abc", $con);
$sql = "INSERT INTO ee (Age) VALUES ('Age')";
if( !mysql_query( $sql, $con ) )
{
die('Error: ' . mysql_error());
}
echo "1 record added";
mysql_close($con)