this is what i have but i cant figure whats not working [code] <?php ob_start(); include("config.php"); ?> [/code] heres the config.php [code] <?php ob_start(); $conn = mysql_connect("localhost","user","pass"); mysql_select_db(database) or die(mysql_error()); $logged = MYSQL_QUERY("SELECT * from users WHERE id='$_COOKIE[id]' AND password = '$_COOKIE[pass]'"); $logged = mysql_fetch_array($logged); ?> [/code] heres the rest of the page [code] <?php echo(" <center> <form method=\"POST\"> Title:<br> <input type=\"text\" size=\"25\" maxlength=\"50\" name=\"title\"><br> By:<br> <input type=\"text\" size=\"25\" maxlength=\"50\" name=\"by\"><br> Message:<br> <textarea cols=\"50\" rows=\"5\" name=\"message\" >test</textarea><br> <input type=\"submit\" value=\"Submit\" name=\"submit\"> </form> </center> "); if ($_POST[submit]) { $title = $_POST[title]; $by = $_POST[by]; $message = $_POST[message]; if ($title==NULL|$by==NULL|$message==NULL) { echo("You left a space blank!"); }else{ $newtime = time(); $time = gmdate("Y-m-d H:i:s", $newtime); $query = mysql_query("INSERT INTO `news` (title, by, on, message) VALUES('$title','$by','$time','$message')"); } } ?> [/code] the query is prob goin to be spaced because its long but i know its like 4 in the mourning but the faster the better
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.