With thanks to all coders here who have contributed and made the forum a success..
I am stuck with, may be a very basic problem.
I have an html form with some input fields.
I've tried the following:
msql part
Code:
-- database connection information --
mysql_query("INSERT INTO `article` (user, desc) VALUES('{$posts['name']}', '{$posts['desc']}')");
echo "added successfully!";
And the form part
1.
Code:
<form method="post">
<input name="name" value="<?php if(isset($posts["name"])) { echo $posts["name"];}?>"/>
<input name="desc" value="<?php if(isset($posts["desc"])) { echo $posts["desc"];}?>"/>
* This works fine but..
2.
Code:
<form method="post">
<input name="name" value="<?php if(isset($posts["name"])) { echo $posts["name"];}?>"/>
<textarea rows="10" name="desc" value="<?php if(isset($posts["desc"])) { echo $posts["desc"];}?>"/>
* This doesnt insert the value into msql database.
The only difference between 1 and 2 is, 1 has input name="desc" and 2 has textarea name="desc"
How can I solve this?