Ok, here is my code to begin with...
//Make sure loging form is displayed
if ($see != "yes"){
echo "$login_block";
}
else if ($see == "yes"){
$db = mysql_connect("-----logon information----");
mysql_select_db("superduper",$db);
$find_user = mysql_query("SELECT * FROM users WHERE user=\"$name\"", $db);
while ($user_search = mysql_fetch_array($find_user)){
$valid_user = "$user_search[user]";
$valid_pass = "$user_search[password]";
}
//check to make sure user is valid
if ((($name != "$valid_user") || ($name == "")) || (($password != "$valid_pass") || ($password == ""))) {
echo "Bad user name or password. Try again.";
echo "$login_block";
}
else{
echo "$post_block";
if ($post == ""){
$send = "no";
$no_post = "Come on I know you want to post something!<br>";
}
if ($send != "no"){
$result = mysql_query("SELECT * FROM weblog",$db);
$sql = "INSERT INTO weblog (post,date,title,name) VALUES ('$post','$date','$title','$valid_user')";
$result = mysql_query($sql);
echo "<div class=words>\n";
echo " Thank you! Information entered.<br>\n";
echo "</div>";
}
else if ($send == "no"){
echo "$no_post";
echo "$redo_block";
}
}
}
After the user logs on, I want to echo the form ($post_block) that will allow them to enter information into the table in the database. My problem is, after the user logs in, $post_block is echoed along with "Come on I know you want to post something!<br>" and the $redo_block. 😕 😕