Cuba Posted May 23, 2008 Report Share Posted May 23, 2008 (edited) vieniigais ko izdod kods ir pazinjojums Please use a real id number , kaut arī datu bāzē tāds id ir.. Te ir db skripts: CREATE TABLE `images` ( `id_image` int(11) NOT NULL auto_increment, `image` blob, PRIMARY KEY (`id_image`) ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1; Un php: <?php error_reporting(E_ALL); if(isset($_GET['id_image']) && is_numeric($_GET['id_image'])) { $link = mysql_connect("localhost", "root", "xxxx") or die("Could not connect: " . mysql_error()); mysql_select_db("db") or die(mysql_error()); $sql = "SELECT image FROM images WHERE id_image = '2'"; $result = mysql_query("$sql") or die("Invalid query: " . mysql_error()); header("Content-type: image/png"); echo mysql_result($result, 0); mysql_close($link); } else { echo 'Please use a real id number'; } ?> Kur ir kljuuda ? :( Edited May 23, 2008 by Cuba Link to comment Share on other sites More sharing options...
andrisp Posted May 23, 2008 Report Share Posted May 23, 2008 Šitā izsauc: tavs_skripts.php?id_image=123 ? Link to comment Share on other sites More sharing options...
Recommended Posts