PHP Classes

File: fwphp/glomodul/blog_akram/ApproveComments.php

Recommend this page to a friend!
  Classes of Slavko Srakocic   B12 PHP FW   fwphp/glomodul/blog_akram/ApproveComments.php   Download  
File: fwphp/glomodul/blog_akram/ApproveComments.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: B12 PHP FW
Manage database records with a PDO CRUD interface
Author: By
Last change: ver 11.0.1.0 mnu, adrs, msg, mkd. Same module db adapter for any shared db adapter
Date: 1 year ago
Size: 521 bytes
 

Contents

Class file image Download
<?php
$title
='Activate comments' ;
require_once(
"ahdr.php");


if(isset(
$_GET["id"])){
   
$IdFromURL=$_GET["id"];
   
$ConnectingDB;
   
$Admin=$_SESSION["Username"];
$Query=get_cursor("UPDATE comments SET status='ON', approvedby='$Admin' WHERE id='$IdFromURL'", 'uu');
if(
$Query){
 
$_SESSION['SuccessMessage']="Comment Approved Successfully";
 
Redirect_to("Comments.php");
  }else{
 
$_SESSION["ErrorMessage"]="Something Went Wrong. Try Again !";
 
Redirect_to("Comments.php");
   
  }
   
   
   
   
   
}

?>