AutoPulse v 1.0.1
 
Loading...
Searching...
No Matches
C:/Users/ivans/OneDrive/Документы/ZWA/sem/confirm-publish.php File Reference

This script handles the approval of publishing of the particular insertion gived by website administrators. Upadates insertion status from "waiting" to "published". More...

Functions

 terminateConfirmPublish ($errorParam)
 

Variables

 $insertion_status = "published"
 
 $id = $_GET['id']
 
 try
 

Detailed Description

This script handles the approval of publishing of the particular insertion gived by website administrators. Upadates insertion status from "waiting" to "published".

Connects to the database, updates the value of 'insertion_status' column of the 'insertions' table from 'waiting' to 'published' for the insertion of a particular id provided as a parameter of GET request. Terminates in case of connection- or update- error and redirects to the main page with an error context info as a parameter of the redirecting GET request.

Function Documentation

◆ terminateConfirmPublish()

terminateConfirmPublish ( $errorParam)

Redirects to the index page with an error parameter.

Parameters
string$errorParamThe error parameter to append to the URL.

Variable Documentation

◆ $id

$id = $_GET['id']

◆ $insertion_status

$insertion_status = "published"

◆ try

try
Initial value:
{
$stmt = $pdo->prepare("
UPDATE insertions
SET
insertion_status = :insertion_status
WHERE id = :id
")
if(! $user) catch(PDOException $e) $pdo
Definition myprofile.php:59
if(! $userExists) $stmt
Definition process-accountDelete.php:48