R
E
S
O
U
R
C
E
S
       Home      Products & Services      Contact Us      Links


WebHatchers will design & develop your site for you.
_______________________

Website Menu Heaven: menus, buttons, etc.
_______________________

Send us your questions.
_______________________

site search by freefind
_______________________

HOME
SEO, Google, Privacy
   and Anonymity
Browser Insanity
JavaScript
Popups and Tooltips
Free Website Search
HTML Form Creator
Animation
Buttons and Menus
Counters
Captchas
Image Uploading
CSS and HTML
PHP
AJAX
XPATH
Website Poll
IM and Texting
Databases—MySQL
   or Not MySQL
Personal Status Boards
Content Management
   Systems
Article Content
   Management Systems
Website Directory
   CMS Systems
Photo Gallery CMS
Forum CMS
Blog CMS
Customer Records
   Management CMS
Address Book CMS
Private Messaging CMS
Chat Room CMS
JavaScript Charts
   and Graphs




Free Personal Status Boards (PSB™)

Free Standard Free PSB

Free PSB Pro Version

Free Social PSB

Free Social PSB Plus (with Email)

Free Business PSB

Free Business PSB Plus (with Email)

PSB demo

Social PSB demo

Business PSB demo

So what's all this PSB stuff about?

Chart comparing business status boards

PSB hosting diagram

PSB Licence Agreement



Copyright © 2002 -
MCS Investments, Inc. sitemap

PSBs, social networking, social evolution, microcommunities, personal status boards
PSBs, social networking, business personal status boards
website design, ecommerce solutions
website menus, buttons, image rotators
Ez-Architect, home design software
the magic carpet and the cement wall, children's adventure book
the squirrel valley railroad, model railroad videos, model train dvds
the deep rock railroad, model railroad videos, model train dvds

Content Management Systems—Article Deleting

Article Content Management System

Article Deleting

Okay, here is the entire article deleting PHP script. This script gets you to input an article title to search for in the "articles" MySQL table and if it finds it, it deletes the article/record. If it doesn't find the title, you get a message saying so. Delete is a simple SQL keyword and DELETE FROM WHERE are the keywords that will do the job—as long as you know the exact title to delete, you're in business. It deletes one record/article and that's that.

SAVE THIS PAGE AS: cms-delete-articles.php


<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1252">
<TITLE>Delete Articles—Content Management System (CMS)</TITLE>
<meta name="description" content="Delete Articles—Content Management System (CMS)">
<meta name="keywords" content="Delete Articles,Content Management System,Content Management System Articles,php,CMS,javascript, dhtml, DHTML">
<style type="text/css">
BODY {margin-left:0; margin-right:0; margin-top:0;text-align:left;background-color:#ddd}
p, li {font:13px Verdana; color:black;text-align:left;text-indent:2em;margin-bottom:-1em}
h1 {font:bold 28px Verdana; color:black;text-align:center}
h2 {font:bold 24px Verdana;text-align:center}
h3 {font:bold 15px Verdana;}
.title {position:absolute;top:10px;left:10px;width:962px}
.form {margin-left:70px}
.info {position:absolute;top:238px;left:2px;width:160px;background-color:#bbb;border:1px solid blue;padding:5px}
</style>
</head>
<body>

<div class='title'>
<h1>Delete Articles—Content Management System (CMS)</h1>

<form class='form' method="post" action="cms-delete-articles.php">
<table width="700" border="0" cellpadding="2" cellspacing="2" align="center">
<tr>
<td width="100" align=right>Title </td>
<td><input name="title" type="text" size="100"></td>
<tr>
<td> </td><td><input name="retrieve" type="submit" value="Delete Article from DB">
<input name="reset" type="reset" value="Reset"></td></tr>
</table>
</form>
</div>

<?php

include_once"config.php";

$T=mysql_real_escape_string($_POST['title']);if(strlen($T)>2){

mysql_query("DELETE FROM articles WHERE title='$T'") or die('Error ,deleting failed');
$rc = mysql_affected_rows();
unset($T);
if ($rc>0){$T='';echo '<script language="javascript">alert("The deleting was successfully accomplished.");</script>';}
else{echo '<script language="javascript">alert("This title does not exist. Please try again.")</script>;';unset($T);}
}
mysql_close();

?>

<div id='info' class='info'>No single or double quotes or Enter/Return allowed in titles. Use letters, numbers, spaces and these: <B> , . ) ? : ( ; _ - ! </b> in title. <br></div>

<?php include("navigation.html"); ?>

</body>
</html>