Jump to content

vanviet

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

vanviet's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. how to store images which is encode in database ( MS ACCESS or MYSQL ,SQL SERVER ) , and then how to display them ? help me now ? i have the big tutorial with it and i try many way but dont success ! help me ! thank !
  2. hi, everyone! i have some codes like this : --------------- upload.htm <form action="binary.php?act=1" method="post" enctype="multipart/form-data" name="form1">   <label>   <input name="filebinary" type="file" id="filebinary">   </label> <input type="hidden" name="MAX_FILE_SIZE" value="96000">   <label>   <input type="submit" name="Submit" value="Submit">   </label> </form> --------------- binary.php <? $act=$_REQUEST[act]; include("databaseconnection.php"); if($act=="1") { $handle =fopen($_FILES['filebinary']['tmp_name'],'rb'); $size=filesize($_FILES['filebinary']['tmp_name']); $sql="INSERT INTO art(matp,tentp,kichthuoc,image,gia) VALUES('1','1','1','$handle',$size)"; $ok=odbc_exec($conn,$sql); if(!$ok) { echo "khong thanh cong <br>"; } else { echo "thanh cong <br>"; echo "<a href =binary.php?act=2>click here</a>"; } } elseif($act==2) { $sql="SELECT * FROM art "; $ok=odbc_exec($conn,$sql); while(odbc_fetch_row($ok)) { $image=odbc_result($ok,"image"); echo fwrite($image,'wb'); } } ?> -------------- i know it has some errors but i tried to get better .finally ,nothing changes. show me how to display image ?  
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.