<form method="post" enctype="multipart/form-data"> <input type="file" name="image"> <input type="submit" name="upload"> </form>
how can uploaded file without saving , how can display it?
use $_files['image']
retrive image.
<?php session_start(); if(isset($_files['image'])){ $file_tmp_name =$_files['image']['tmp_name']; $str = file_get_contents($file_tmp_name); $b64img=base64_encode($str); $_session['image'] = $b64img; // holds image string in session without saving it. }
Comments
Post a Comment