entren aqui
del lado derecho, podran ver al como:
---------------------------------------------------------
HOY ME SIENTO
¿QUE HAGO?
+Dia: 04/02/03
+Hora: 19:44
Comiendo: ...el mundo
Bebiendo: Cocacola
Pensando: Vacaciones?
Viendo: Nada
Escuchando: Let it be (the beatles)
Visitando: http://www.punton3t.com
----------------------------------------
y pues este script (camargo) tiene esta estructura para que muestre los resultado mas o menos en la forma que vieron de esa pagina:
consta de 4 archivos .php y un .sql
![borracho](http://static.forosdelweb.com/fdwtheme/images/smilies/borracho.png)
el .sql tiene esto:
SQL-query :
CREATE TABLE hoymesiento (
id int(7) NOT NULL auto_increment,
dia longtext NOT NULL,
hora longtext NOT NULL,
comiendo longtext NOT NULL,
bebiendo longtext NOT NULL,
pensando longtext NOT NULL,
imagen LONGBLOB,
filetype CHAR(50),
viendo CHAR(250),
escuchando char(250) default NULL,
visitando char(250) default NULL,
PRIMARY KEY (id)
)
conexion.php
este si quedo
![borracho](http://static.forosdelweb.com/fdwtheme/images/smilies/borracho.png)
el form.php que es el formulario tiene esto:
<?
include("conexion.php");
if($accion=="mandar"){
$dia = (date("d/m/Y"));
$hora = date(H);
$hora .= ":";
$hora .= date(i);
$hora2 = $hora;
$data = addslashes(fread(fopen($form_data, "r"), filesize($form_data)));
mysql_query("INSERT INTO hoymesiento (dia,hora,comiendo,bebiendo,pensando,imagen,filety pe,viendo,escuchando,visitando) VALUES
('$dia','$hora2','$comiendo','$bebiendo','$pensand o','$data','$form_data_type','$viendo','$escuchand o','$visitando')");
echo "<font size=2 face=Tahoma><b>
Enviado a la BD con exito..</b>";
mysql_close ($conexio);
} else {
echo "<form method=post action=\"form.php?accion=mandar\" enctype=\"multipart/form-data\">
Comiendo: <input type=text name=comiendo><br>
Bebiendo: <input type=text name=bebiendo><br>
Pensando: <input type=text name=pensando><br>
ImageN: <input type=\"file\" name=\"form_data\"><br>
Viendo: <input type=text name=viendo><br>
Escuchando: <input type=text name=escuchando><br>
Visitando: <input type=text name=visitando><br>
<input type=submit name=enviar value=Enviar></form>";
}
?>
despues esta imagen.php
<?php
if($id) {
include("conexion.php");
$hazquery = "select imagen,filetype from hoymesiento where id LIKE '$id'";
$resultexe = @MYSQL_QUERY($hazquery);
$data = @MYSQL_RESULT($resultexe,0,"imagen");
$type = @MYSQL_RESULT($resultexe,0,"filetype");
Header( "Content-type: $type");
echo $data;
};
?>
y ver.php (este ultimo no sirve, de hecho vean como queda)
me quedo mal aqu, veanlo O_o
y tiene esto
<?
include("conexion.php");
$result = mysql_query("select * from hoymesiento ORDER BY id DESC LIMIT 1");
IF ($row=mysql_fetch_array($result))
{
echo "<table width=300 border=0>";
DO
{
echo "<font face=Tahoma size=1><img src=\"imagen.php?id=".$row[id]."><br>
Dia: ".$row[dia]."<br>
Hora: ".$row[hora]."<br>
Comiendo: ".$row[comiendo]."<br>
Bebiendo: ".$row[bebiendo]."<br>
Pensando: ".$row[pensando]."<br>
Viendo: ".$row[viendo]."<br>
Escuchando: ".$row[escuchando]."<br>
Visitando: ".$row[visitando]."<br>
";
}
WHILE ($row= mysql_fetch_array($result));
}
echo "</table>";
?>
es mas, entren y pruebenlo ustedes mismos:
aqui entran y mandan la informacion por el formulario :P
ahora entren aqui, haber que ven
![ojotes](http://static.forosdelweb.com/fdwtheme/images/smilies/ojotes.png)
![lloron](http://static.forosdelweb.com/fdwtheme/images/smilies/chillando.png)
me quedo mal aqu, veanlo O_o
que puede estar mal?
![ojotes](http://static.forosdelweb.com/fdwtheme/images/smilies/ojotes.png)
![borracho](http://static.forosdelweb.com/fdwtheme/images/smilies/borracho.png)
![sonriente](http://static.forosdelweb.com/fdwtheme/images/smilies/smile.png)
de antemano gracias
![lloron](http://static.forosdelweb.com/fdwtheme/images/smilies/chillando.png)