I have a form that is suposed to insert a new record in to the db when someone clicks on the submit button
I think i have it set u p correctly her is my page
<?php
if (isset ($_POST['post'])){
$tanounce = $_POST['announcements'];
$announce = trim($tannounce);
if ( !empty($announce) )
{
mysql_query("INSERT INTO `impactathletics`.`team` (`announcements`)
WHERE team_id = '1'
VALUES ('$announce')");
}
}
?>
<html>
<head>
</head>
<body>
<form method="post" action="<?php echo $_SERVER['PHP_SELF'] ?>">
<textarea name="announcements" cols="45" rows="5"></textarea>
<br />
<input type="submit" value="Submit" />
<br />
</form>
</body>
</heml>
can any one see the problem?
side note the table its supposed to be inserted into already contains info. Will it add to the field? or will it drop it.