Web hosting billing - if (isset($_POST[ authorid ])) { redirect( cpanel.php ); } else { redirect( pending.php );

if (isset($_POST[ authorid ])) { redirect( cpanel.php ); } else { redirect( pending.php ); } break; Next you make sure the article ID was passed. If it was, modify the article in the database to set the is_published column to 1, and set the date_published datetime column to the current date and time (formatted in MySQL datetime format). case Publish : if ($_POST[ article ]) { $sql = UPDATE cms_articles . SET is_published=1, date_published= . date( Y-m-d H:i:s ,time()) . . WHERE article_id= . $_POST[ article ]; mysql_query($sql, $conn) or die( Could not publish article; . mysql_error()); } redirect( pending.php ); break; This next case is actually quite similar to the Publish case, only this time, after checking the article ID, you set is_published to 0 and erase the date_published field. Retracting an article in this case simply returns it to its pre-published state, but you might think of better ways to retract an article. Perhaps you could have separate columns for is_retracted and retract_date. There is no right or wrong way to do it, and, of course, it depends on the needs of your own site. case Retract : if ($_POST[ article ]) { $sql = UPDATE cms_articles . SET is_published=0, date_published= . WHERE article_id= . $_POST[ article ]; mysql_query($sql, $conn) or die( Could not retract article; . mysql_error()); } redirect( pending.php ); break; Check to see that an article ID was passed, and simply delete the record. case Delete : if ($_POST[ article ]) { $sql = DELETE FROM cms_articles . WHERE is_published=0 . AND article_id= . $_POST[ article ]; mysql_query($sql, $conn) or die( Could not delete article; . mysql_error()); } 442 Chapter 13
You want to have a cheap webhost for your apache application, then check apache web hosting services.

Leave a Reply