| Manage FAQs: |
|
|
FAQ Entry |
Updated |
Active |
MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE);
while ($row = mysql_fetch_array($sql_result)) {
//Create Customizeable Timestamp
$date = $row["lastupdated"];
$day=substr($date,6,2); //get the day
$month=substr($date,4,2); //get the month
$year=substr($date,0,4); //get the year
$hour=substr($date,8,2); //get the hour
$minute=substr($date,10,2); //get the minute
$second=substr($date,12,2); //get the sec
$timestamp = strtotime("$year-$month-$day $hour:$minute:$second");
$lastupdated = gmdate("F d, Y g:i:sa", $timestamp);
$applications[] = $row["AppName"];
echo"\n";
echo"| ".++$i." | \n";
echo" ".$row["title"]." | \n";
echo"$lastupdated | \n";
echo"$row[active] | \n";
echo"
\n";
}
?>
MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE);
echo"Your update to $_POST[title], has been successful.
";
} else if ($_POST["submit"] == "Delete Entry") {
$sql = "DELETE FROM `t_faq` WHERE `id`='$_POST[id]'";
$sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."
", E_USER_NOTICE);
echo"You've successfully deleted the application '$_POST[AppName]'.
";
}
if (!$id) { $id = $_POST["id"]; }
// Show Edit Form
$sql = "SELECT * FROM `t_faq` WHERE `id` = '$id' LIMIT 1";
$sql_result = mysql_query($sql, $connection) or trigger_error("MySQL Error ".mysql_errno().": ".mysql_error()."
", E_USER_NOTICE);
$row = mysql_fetch_array($sql_result);
?>
MySQL Error ".mysql_errno().": ".mysql_error()."", E_USER_NOTICE);
echo"The entry $_POST[title] has been successfully added.
";
}
?>