Jump to content

BillyBoB

Members
  • Posts

    630
  • Joined

  • Last visited

    Never

Everything posted by BillyBoB

  1. nothing happens thats the prob i need the data to go to the database but it doesnt
  2. im goin to edit but the Value=\"Submit\" is the text that shows up on the button
  3. $datefromdb = $sominhere['time_data']; $year = substr($datefromdb,0,4); $mon  = substr($datefromdb,4,2); $day  = substr($datefromdb,6,2); $hour = substr($datefromdb,8,2); $min  = substr($datefromdb,10,2); $sec  = substr($datefromdb,12,2); $orgdate = date("l F dS, Y h:i A",mktime($hour,$min,$sec,$mon,$day,$year)); ?> Date: <? echo $orgdate; ?>
  4. 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
×
×
  • Create New...

Important Information

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.