my facebook
karim Rouari
https://www.facebook.com/karim.snile.7
كود:
<html><head><title>file</title></head><body><form action="index.php" method="post" enctype="multipart/form-data"> File : <input type="file" name="image"> <input type="submit" value="upload"></form><?phpinclude ("config.php");$file = $_FILES['image']['tmp_name'];if (!isset($file)) echo "Please select image";else{ $image = addslashes (file_get_contents($_FILES ['image']['tmp_name'])); $image_name = addslashes ($_FILES['image']['name']); $image_size = getimagesize($_FILES['image']['tmp_name']); if ($image_size==FALSE) echo "that's not an image"; else { if (!$insert = mysql_query ("INSERT INTO store VALUES ('','$image_name','$image')")) echo "Problem"; else { $lastid = mysql_insert_id(); echo "Image uploaded.<p />Your image:<p /><img src=get.php?id=$lastid>"; } } }?><
<?include ("config.php");$id = addslashes ($_REQUEST ['id']);$image = mysql_query ("SELECT * FROM store WHERE id=$id");$image = mysql_fetch_assoc ($image);$image = $image ['image'];header ("Content-type: image/jpeg");echo $image;?>
<?mysql_connect("localhost","root","brontok");mysql_select_db("upload");?>