rendered paste body<?php
require "conninfo.php";
$mysqli = new mysqli($serverbd, $userbd, $passbd, $bd);
$idnews = intval($_GET['idnt']);
/* check connection */
if (mysqli_connect_errno()) {
printf("Connect failed: %s\n", mysqli_connect_error());
exit();
}
$stmt = $mysqli->prepare("SELECT * FROM NOTICIAS WHERE IDNOTICIA = ?");
$stmt->bind_param('i', $idnews);
/* execute prepared statement */
$stmt->execute();
//printf("%d Row inserted.\n", $stmt->affected_rows);
//WOULD THIS WORK?
$results = $stmt->fetch_object();
echo $results->TITLE;
//?
/* close statement and connection */
$stmt->close();
/* Clean up table CountryLanguage */
//$mysqli->query("DELETE FROM NOTICIAS WHERE TITULO='DEU'");
//printf("%d Row deleted.\n", $mysqli->affected_rows);
/* close connection */
$mysqli->close();
?>