Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $db = mysqli_connect("127.0.0.1", "bnubseen_db40", "21319344$!", "bnubseen_db40");
- //Obtain the file sent to the server within the response.
- $image = $_FILES['monsterimage']['tmp_name'];
- $audio = $_FILES['monsteraudio']['tmp_name'];
- //Get the file binary data
- $imagedata = addslashes(fread(fopen($image, "r"), filesize($image)));
- $audiodata = addslashes(fread(fopen($audio, "r"), filesize($audio)));
- $sql = "INSERT INTO monster";
- $sql = "(Name, Image, Audio)";
- $sql = "VALUES ('$_POST[txtname]','$imagedata','$audiodata');";
- $result = mysqli_query($db, $sql);
- echo $sql;
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement