sorry if I'm getting annoying guy's, but the questions I ask, I only ask once ;-)
here goes, I basically want to stuff entered to get inserted to the database, thats it! by the way, I know that the stuff isn't getting added because it echos so in my code and I checked my database and it was'nt added.
here's my code: (important stuff I think would be after the first break;.
<?php include("session_check.inc.php"); ?>
<?php
$db_name = "novaz3ro_com";
$connect = mysql_connect('localhost','***','***');
$db = mysql_select_db($db_name,$connect);
?>
<html><head><title>SEA adminCP v1.0</title>
<?php include("style.inc"); ?>
</head>
<body bgcolor="#DEAD9D">
<center>
<img src="top_logo.gif">
<br><br>
<table size="100%" cellpadding="0" cellspacing="0" border="1" bordercolor="#000000">
<TR height="20">
<TD align="center" valign="middle" bgcolor="#AD8C8C" width="750"><font color="black" size="3">SEA adminCP v1.0</font></TD>
</TR>
</table>
<br>
<table size="100%" cellpadding="0" cellspacing="0" border="1" bordercolor="#000000">
<TR height="20">
<TD align="center" valign="middle" bgcolor="#AD8C8C" width="750"><font color="black" size="3"><?php include("menu.inc") ?></font></TD>
</TR>
</table>
<br>
<table size="100%" cellpadding="0" cellspacing="0" border="1" bordercolor="#000000">
<TR height="500">
<TD align="left" valign="top" bgcolor="#E7BD94" width="750">
<br>
<!-- body start --!>
<?php
$date = date("m.d.y");
switch ($action) {
default:
echo "<form method=\"post\" action=\"news.php?action=add\">";
session_register("username");
echo " <b>Author:</b> $username<br>
<b>Date:</b> $date<br>
<b>Subject:</b> <input type=\"text\" size=\"40\" name=\"article_subject\" name=\"article_subject\"><br>
<b>Content:</b><br>
<textarea name=\"article_content\" ROWS=\"12\" COLS=\"40\" name=\"article_content\">
</textarea><p>
<button type=\"submit\" style=\"font-family: v; font-size: 10pt; color: #A89788; border: 1px solid #A89788; background-color: #DEAD9D; padding-left: 4; padding-right: 4;\">Post</button>
</form>";
break;
case "add":
$add_news = "<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">
<TR height=\"30\">
<TD bgcolor=\"#000000\" width=\"450\" align=\"left\" valign=\"middle\"><font size=\"2\">$article_subject</font> - <font size=\"2\">Posted @ $date by $username</font></TD></TR>
<TR>
<TD bgcolor=\"#002660\" width=\"450\" align=\"left\" valign=\"top\">$article_content</TD></TR>
</table>
<br><br><br>";
$query = "INSERT INTO SEA_news (content) VALUE ('$add_news')";
$query_check = mysql_query("INSERT INTO SEA_news (content) VALUE ('$add_news')", $connect);
mysql_query("$query", $connect);
mysql_error();
if ($query_check == TRUE) {
echo "<center>News was successfully updated.</center>";
}else{
echo "<center>There was a problem when updating the news, please try again.</center>";
}
break;
}
?>
<!-- body end --!>
</TD>
</TR>
</table>
<br>
<table size="100%" cellpadding="0" cellspacing="0" border="1" bordercolor="#000000">
<TR height="20">
<TD align="center" valign="middle" bgcolor="#A89788" width="750"><font color="black" size="3">Copyright 2002~2003 © <a href="http://novaz3ro.com/">H-L.C.</a> Desing & PHP.</font></TD>
</TR>
</table>
</body>
</html>
thanx a lot guys