Jump to content

Recommended Posts

<html>
<head>
<link rel="stylesheet" href="_admin-style.css" />
</head>
<body>
<?php
include 'host_connect.php';
$server = 'temp';
$temporal = $_FILES['imagen']['tmp_name'];
$image_name = $_FILES['imagen']['name'];
$folder = $server.'/'.$image_name;
move_uploaded_file($temporal,$folder);
$desc = $_POST['descripcion'];
$link = $_POST['link'];
$sql = "INSERT INTO datos (ruta,descripcion,link) values('".folder."','".$desc."','".$link."')";
$res = mysql_query($sql);

if ($res)
{

?>
<div class="user">
<input type='button' value='Volver al panel' onclick='window.location="user_panel.php"' style="margin-left:400px;" />
<p style="margin-left:400px;">Imagen guardada y recibida correctamente.</p>
</div>
<?php
}
else
{
?>
<div class="user">
<input type='button' value='Volver al panel' onclick='window.location="user_panel.php"' style="margin-left:400px;" />
<p style="margin-left:400px;">No se puede guardar la imagen.</p>
</div>
<?php
}
?>
</body>
</html>

Edited by KaiKiller
Link to comment
https://forums.phpfreaks.com/topic/270215-move_uploaded_file-unable-to-move-file/
Share on other sites

I'm going to try one more time:  Copy and paste the actual error.  Do not paraphrase.  Do not summarize.  The computer is telling you there is a problem, tell us what the computer is telling you if you don't understand.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.