-1
$result = mysqli_query($con,$addtothedb);
$cur = "USERS/";
echo $des = $cur.$email.'/';

if($result){
  if ( mkdir($des,0777) ) {
  //http://pastebin.com/7J0BM5fD
  echo "<br/>";
  echo "<br/>";
  echo $file_name = $_FILES['file']['name']= 'mfix.png';
  echo "<br/>";
  echo "<br/>";
  echo $file_tmp =$_FILES['file']['tmp_name']= 'mfix.png';
  echo "<br/>";
  echo "<br/>";
  move_uploaded_file($file_tmp, $des.$mfix);
  echo "<img  src='<?php echo $mfix ;?>' alt='Image' style='width:100px;height:100px'>";
  /*echo "<img  src=' mfix.png' alt='Image' style='width:100px;height:100px'>";*/
  echo " <div id='success'> Account Successfully Created. <br> Now you can Login. </div>";                 
}

why it doesnt working?

Edited by JorgeM: formatted code so its legible

2
Contributors
2
Replies
11
Views
2 Years
Discussion Span
Last Post by phoenix254
0

first, please present your code in format that is easier to read. I edited your post because it was very difficult to even look at your code.

next, for the benefit of people trying to help you, provide some information and details, such as what error message do you see on the screen? What are you trying to do?

then, other members here can take a quick look and provide you with guidance.

0

This code is from my register form page.

problem
$mfix="mfix.png";
1.)move_uploaded_file($file_tmp, $des.$mfix); why this is not working ?
2.) i want that image (mfix.png) go to user folder when create his account

Edited by phoenix254

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.