Jump to content


Tio Bob

Member Since 21/04/2003
Offline Last Active 17/01/2004, 17:34
-----

Posts I've Made

In Topic: Imagem No Bd

23/06/2003, 00:34

cara da dando pau aqui..... ve ae que erro grotesco estou cometendo

<?php
$pass = MD5($pass);
$imagem = 'imagens/' . $HTTP_POST_FILES["imagem"]["name"]), '.');
$orig = $HTTP_POST_FILES["imagem"]["tmp_name"];
if (!copy($orig, $foto)) {
echo "<br><br><center>Problemas no upload do arquivo: " . $HTTP_POST_FILES["imagem"]["name"] . "...<br>";
$erro = "yes";
$foto = "";
}
$sql = "INSERT INTO `admin` (`ID`, `username`, `imagem`) VALUES (Null, '$user', '$imagem')";
$add = mysql_query($sql) or die ("$error Could add $user to admin table</font>");
print("$user has been added to admin table");
}
print("<form method='POST' action='$php_self'>

  <table border='0' width='53%'>
    <tr>
      <td width='74%' align='right'><b>Username:</b></td>
      <td width='58%'>
        <p align='left'><input type='text' name='user' size='20'> </td>
    </tr>
<tr>
      <td width='74%' align='right'><b>Avatar:</b></td>
      <td width='58%'>
<p align='left'><input name='imagem' type='file' size='20'></td>
    </tr>
  </table>
</form>");
?>

IPB Skin By Virteq