why is this: $time = date("g:iA");
giving me so much trouble?
When i run that code, I get a blank white screen. If I pull the colon out it works,
but it should work with it in there, right? It works on my other pages of code...
entire code snippet:
<?php
session_start();
if (!isset($_SESSION['username'])) {
header("Location: login.php");
exit;
}
// Makes initial conection to database
define ('DB_USER', '*****');
define ('DB_PASSWORD', '*****');
define ('DB_HOST', 'localhost');
define ('DB_NAME', '*****');
$connect = @mysql_connect(DB_HOST, DB_USER, DB_PASSWORD)
or die('215 Our database is currently down for updates, please check back later.');
// or die(mysql_error());
$db = @mysql_select_db(DB_NAME, $connect)
or die('216 Our database is currently down for updates, please check back later.');
$subid = mysql_real_escape_string($_POST['subid']);
$addnote = mysql_real_escape_string($_POST['addnote']);
$emplID = ($username);
$date = date("m/d/y");
$time = date("g:iA");
$id4pass = mysql_real_escape_string($_POST['subid']);
$addnote="INSERT INTO subscriber_notes (subsID, emplID, date, time, sessid, note) VALUES ('$subid', '$emplID', '$date', '$time', '$PHPSESSID', '$addnote')";
$addnote_result= mysql_query($addnote)
OR die('QUERY ERROR:<br />' .$addnote. '<br />' .mysql_error());
// Gets auto-increment subscriber id
//$id = mysql_insert_id($subid);
// Routes to subscriber detail page
header("Location: ../subscriberdetail.php?id=$id4pass");
exit;
?>