
Originally Posted by
aamonkey
Can you post the entire form script and form handling script?
SQL
Code SQL:
CREATE TABLE `articletable` (
`id` BIGINT(20) NOT NULL AUTO_INCREMENT,
`articlebody` longtext NOT NULL,
UNIQUE KEY `id` (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ;
PHP Code:
include("database.php"); // your database data goes here
@$dbcon = mysql_connect(DB_HOST,DB_USER,DB_PASSWORD);
@$dmotorsConn = mysql_select_db (DB_NAME, $dbcon);
if($_POST[articlebody] !="")
{
$insertseed = "INSERT INTO articletable (articlebody) VALUES ('$_POST[articlebody]')";
mysql_query($insertseed) or die("Couldn't execute query <br> $insertseed");
}
echo "<form method=post>";
$combine .= "<h3><font color=green> Step 1:</font> Create New Campaign </h3>";
$combine .= "
Try saving this article: http://news.yahoo.com/s/ap/20110409/ap_on_re_us/as_japan_earthquake_nuclear_endgame
<table>
";
$combine .= "
<tr>
<td>
<strong>Article Body </strong>
</td>
<td>
<textarea cols=80 rows=7 name=\"articlebody\">$cleancontent</textarea>
</td>
</tr>
<tr>
<td>
</td>
<td>
<input type=submit value=\"save it\">
</td>
</tr>
</table>
";
$combine .= "</form>";
echo $combine;
Bookmarks