include('includes/conexion.php');
$id=$_GET[id];
?>
//funcion parrafo
function enportada($string) {
$article = explode("", $string);
$parrafo = $article[0];
return( $parrafo );
}
?>
//hacemos las consultas
mysql_query("set names 'utf8'");
$result=mysql_query("select * from cocina_recetas where id = '$id'", $connect);
$totalregistros=mysql_num_rows($result);
//Recogemos las consultas en un array y las mostramos
while($row=mysql_fetch_array($result))
{
echo '
| |
'.$row[titular].'
|
|
';
if ( $row[imagen1] != "") {
print'
| |
 '; }
if ( $row[imagen2] != "") {
print'   '; }
if ( $row[imagen1] != "") {
print'
|
|
'; }
if ( $row[ingredientes] != "") {
print'
|
'.nl2br($row[ingredientes]).'
|
|
'; }
if ( $row[noticia] != "") {
print'
|
'.nl2br($row[noticia]).'
|
|
'; }
print '
| |
Dificultad: '.$row[dificultad].', Precio: '.$row[precio].' por persona, Receta elaborada por: '.$row[usuario].', archivado en '.$row[tipo].'
|
|
|
';
}
mysql_free_result($result)
?>