skusil sem to s Sql ale taky to nejede zde kod poradí někdo ?
mysql>
CREATE TABLE foto_soubor (
foto int,
photo longlob,
photo_type varchar(50) default NULL,
);
<?php
//necten9 binarni promnene
$foto = 16;
$file = "skouska.jpg";
$path = "home/viperalaurenti/data/";
$form_data = $path . "/" . $file;
$fp = fopen($form_data, "r");
$data = sddslashes(fread($fp, filesize($form_data)));
fclose($fp);
$type = $the_file_type;
//ulozeni dat
$link = mysql_connect("mysql.webzdarma.cz","","");
$sql = "update foto_soubor set foto = "$data", type = "$type"
where foto = $foto";
$result=MYSQL?QUERY($sql);
mysql_free_result($result);
mysql_close();
?>
<?php
if($id) {
$link = mysql_connect("mysql.webzdarma.cz","*","");
mysql?select_db("test");
$sql = "select photo, type from foto_soubor where id=$id;
$result = @MYSQL?QUERY($sql);
$data = @MYSQL_RESULT($result,0,"photo");
$type = @MYSQL_RESULT($result,0,"type");
mysql_free_result();
mysql_close();
Header( "Content-type: $type");
echo $data;
};
?>
píše to todle :
Parse error: parse error in /3w/webzdarma.cz/v/viperalaurenti/sql.php on line 21