Location: PHPKode > scripts > Quotations Database > quotations-database/admin/show_authors.php
:::: Quotations Database ::::
PHP & MySQL application that stores quotations and author information, 
allows scheduling for 'quote of the day' and weekly themes.
Includes an administration interface to allow for easy updates and maintenance.
Copyright (C) 2009  Robert Temple

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.

You can contact the author at hide@address.com
Please do not remove the author, copyright, or license info.

// Initialize session and check to make sure user is registered and logged in
include "include/session.php"; 

// Connect  to database
include "include/connect.php";

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
	<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
	<title> Edit Authors</title>	
    <link href="../quotation.css" rel="stylesheet" type="text/css">
<table width="550" border="0" align="center" cellpadding="1" cellspacing="0" bgcolor="#000000">
<table width="548" border="0" align="center" cellpadding="1" bgcolor="#FFFFFF">
    <td bgcolor="#99FF00"><br>
          <span class="header">Edit Authors</span><br>
&nbsp;&nbsp;&nbsp;<a href="index.php">Admin page</a><br>
  <Td bgcolor="#cccccc"></Td>
      <table width="300" align="center" cellpadding="2">
	$query = "SELECT * from AuthorTBL ORDER by Lastname ASC";
$result = mysql_query($query) or die ( mysql_error() );

while ($row = mysql_fetch_array($result, MYSQL_ASSOC))
	$Author_ID = $row["Id"];
	$Firstname = $row["Firstname"];
	$Lastname = $row["Lastname"];	
    echo "<tr>";
	echo "<td width=\"200\" class=\"bodyCopy\">$Firstname $Lastname</td>";
    echo "<td width=\"50\" class=\"bodyCopy\"><a href=\"edit_authors.php?ID=$Author_ID\">Edit</a></td>";
    echo "<td width=\"50\" class=\"bodyCopy\"><a href=\"delete_author.php?ID=$Author_ID\">Delete</td>";
	echo "</tr>";
  <Td bgcolor="#cccccc">
  <Td align="center"><a href="add_authors.php"><br>
Add new author</a><br>
Return current item: Quotations Database