udelas si tabulky s patricnyma sloupcema, ze, a pak na sajtu si das nekam edit na soubory. nekde na servru adresar s pravama zapisu a do obsluhy pak muzes dat neco takovehleho. je to jen ilustrativni
v html takto ten edit. jeste form si pridas
a do toho neco .php das tohle, z toho sql dotazu je jasne jak bude vypadat ta tabulka. treba taktoKód:<form method='post' action='neco.php' enctype='multipart/form-data'> <input type='submit' value='Add Image' class='forms' name='post_dataform'>
Kód:CREATE TABLE `images` ( `ID_image` int(10) unsigned NOT NULL auto_increment, `ID_section` smallint(6) unsigned NOT NULL default '0', `ID_post` int(10) unsigned NOT NULL default '0', `F_name` varchar(100) NOT NULL default '', `F_ext` varchar(100) NOT NULL default '', `F_size` mediumint(8) unsigned NOT NULL default '0', `D_owner` varchar(30) NOT NULL default '', PRIMARY KEY (`ID_image`) ) TYPE=MyISAM AUTO_INCREMENT=0 ;Kód:If(($add_image_name != "") && ($add_image_type != "image") ) { //if (!file_exists("./postdata/$ID_section")) mkdir("./postdata/$ID_section", 0777); //if (!file_exists("./postdata/$ID_section/$ID_post")) mkdir("./postdata/$ID_section/$ID_post", 0777); @copy("$add_image", "./postdata/[$ID_section][$ID_post]-$add_image_name") or die("No copy!"); if (file_exists("./postdata/[$ID_section][$ID_post]-$add_image_name")) { mysql_query("INSERT INTO `images` (`ID_section`, `ID_post`, `F_name`, `F_size`, `F_ext`, `D_owner`) VALUES ( '$ID_section', '$ID_post', '[$ID_section][$ID_post]-$add_image_name', '$add_image_size', '$add_image_type', '$D_owner' )", $connection) or die("Can't Perform Query"); } }





Odpověď s citací