Codice PHP:
//START FUNZIONE DI DUPLICAZIONE
<?php ob_start();
require_once($_SERVER['DOCUMENT_ROOT'].'dboperations.php');
require_once($_SERVER['DOCUMENT_ROOT'].'docroot.php');
require_once($_SERVER['DOCUMENT_ROOT'].'functions.php');
require_once($_SERVER['DOCUMENT_ROOT'].'config.php');
$annuncioid= $url_arr[3];
$queryString = "INSERT INTO annunci_annunci (annuncio_description, annuncio_startdate, annuncio_image, annuncio_createdby, annuncio_createddate, annuncio_offer, annuncio_status, annuncio_minuserlimit, annuncio_maxuserlimit, annuncio_realvalue, annuncio_category, annuncio_zones, annuncio_shop, annuncio_country, annuncio_city, annuncio_person, annuncio_phoneno, annuncio_address, annuncio_fineprints, annuncio_highlights, terms_and_condition, , pay_capture_status, side_deal, meta_keywords, meta_description)
SELECT annuncio_id, annuncio_name, annuncio_description, annuncio_startdate, annuncio_image, annuncio_createdby, annuncio_createddate, annuncio_offer, annuncio_status, annuncio_minuserlimit, annuncio_maxuserlimit, annuncio_realvalue, annuncio_category, annuncio_zones, annuncio_shop, annuncio_country, annuncio_city, annuncio_person, annuncio_phoneno, annuncio_address, annuncio_fineprints, annuncio_highlights, terms_and_condition, pay_capture_status, side_deal, meta_keywords, meta_description FROM annunci_annunci where annuncio_id=".$annuncioid;
set_response_mes(1,'Operazione eseguita correttamente.');
$redirect_url = DOCROOT."/annunci-in-corso/";
url_redirect($redirect_url);
ob_flush();
?>
//END FUNZIONE DI DUPLICAZIONE
L'array annuncioid viene lanciata da un'altra pagina che richiama la query descritta qui sopra.