Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.

heeelllppp!!!! Smarty... Conex

 
Post new topic   Reply to topic    Smarty Forum Index -> Help Wanted (commercial)
View previous topic :: View next topic  
Author Message
Fogox
Smarty Rookie


Joined: 09 Apr 2008
Posts: 6

PostPosted: Fri Apr 11, 2008 8:52 pm    Post subject: heeelllppp!!!! Smarty... Conex Reply with quote

I need help in this code I am again with smarty wanted to know if I offered their help,
I have also problems with the connection to mysql smarty ...

In the tutorial does not explain well the theme of connection, I leave in your hands

Forgive my English,

Thank you


<?php
# Eial 2004 la versión orginial se encuentra en # Configurar las dos lineas siguientes

@mysql_connect('localhost','xxxxx','xxxxx') or die('No se puede conectar con el servidor mysql');

@mysql_select_db('xxxx') or die('No se puede seleccionar la base de datos especificada');

$datos = ($_GET['id']) ? 'id=' . mysql_escape_string($_GET['id']) : "nombre='" . mysql_escape_string($_GET['nombre']) . "'";

$resultado = @mysql_query("SELECT imagen,tipo FROM xxxx WHERE " . $datos);

$imagen = @mysql_fetch_assoc($resultado) or die('Imagen inexistente');

header("Content-type: $imagen[tipo]");

print $imagen['imagen'];

?>
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Smarty Forum Index -> Help Wanted (commercial) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP