0

I have a form that saves images in a folder on the server and the image info on a database. What i would like to do is echo out the img src of the image after it was uploaded. My question is Can i use the variables from the form itself and put them in the img src tag?

 $filetmp  = mysql_real_escape_string($_FILES["image"]["tmp_name"]);
 $imageName= mysql_real_escape_string($_FILES['image']['name']);
 $imageData=mysql_real_escape_string(file_get_contents($_FILES['image']['tmp_name']));
 $imageType=mysql_real_escape_string($_FILES['image']['type']);
 $filepath = "wp-content/uploads/2016/06/".$imageName;
 $url = "http://apklegion.com/";

what ive tried is this.

echo '<img src="$url.$filepath.$imageName" style= "width:200px;height:200px;">';

Which dosent display anything.

Zanzi
  • 57
  • 1
  • 1
  • 8

0 Answers0