csckid Posted July 1, 2010 Share Posted July 1, 2010 I'm transferring byte[] from another file using $_POST. How do i convert this $_POST variable into byte[] and save into blob? Thanks Link to comment https://forums.phpfreaks.com/topic/206421-save-byte-into-blob/ Share on other sites More sharing options...
kenrbnsn Posted July 1, 2010 Share Posted July 1, 2010 Code please? Ken Link to comment https://forums.phpfreaks.com/topic/206421-save-byte-into-blob/#findComment-1079851 Share on other sites More sharing options...
csckid Posted July 1, 2010 Author Share Posted July 1, 2010 Java Code final byte[] r=record; byte[] data = ("name=" + "myname"+ "&blob=" + r).getBytes(); out.write(data); PHP code <?php require("phpfunc.fns"); sqlconnect(); $name = trim($_POST["name"]); $blob =($_POST["blob"]); $sql="insert into myblob values('".$name."',".$blob.")"; mysql_query( $sql); ?> $blob is in byte[] format. I need to save this into mysql blob datatype Link to comment https://forums.phpfreaks.com/topic/206421-save-byte-into-blob/#findComment-1079863 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.