Forum Moderators: coopster
The problem is..
when I insert some text in form field and press the submit button I recieve a message from -insert.php - "record added", but when I look in - tasteTable - only (auto_increment) "id" field has changed but there is no text in -testField- that I put in form field.
......why?
tnx!
insert_form.html code:
<html>
<head>
<title>Insert Form</title>
</head>
<body>
<form action="insert.php" METHOD="post">
<p>text to add:<br>
<input type=text name="testfield" size=30 value="">
<p><input type="submit" name="submit" value="Insert Record"><p>
</form>
</body>
</html>
-------------------
insert.php code:
<?
$conn = mysql_connect("localhost", "myusername", "mypass");
mysql_select_db("contactDB",$conn);
$sql = "INSERT INTO testTable values ('', '$testField')";
if (mysql_query($sql, $conn)) {
echo "record added!";
} else {
echo "something went wrong";
}
?>
>mavherick
yes, that was the problem...thanx! :)
so..now I can put the content of that form into mysql,
is there any chance to send that content with an email,
directly from that page?
tnx!
[php.net...]