COMO FAZER A EDIÇÃO DA IMAGEM
ola galera não sei se aqui e o lugar certo de fazer este poste sou novo aqui
Mais se alguem ai poderia me mostra como que eu posso fazer alteração de uma imagem que ja foi para o banco de dados
eu tenho o arquivo so de fazer upload da imagem
este é o arquivo de fazer cadastro
<style type="text/css">
<!--
body,td,th {
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
}body {
margin-left: 10px;
margin-top: 10px;
margin-right: 10px;
margin-bottom: 10px;
background-image: url();
}
.style6 {
font-size: 24px;
font-weight: bold;
}-->
</style>
<body bgcolor="#CCCCCC">
<form action="upload.php" method="post" enctype="multipart/form-data">
<div align="center" class="style6"></div>
<table width="467" border="0" align="center" cellpadding="5" cellspacing="1">
<tr bgcolor="#FFFFFF">
<th height="52" colspan="4" align="right" scope="col"><div align="right"></div>
<div align="center"><font size="4">ENVIE FOTO</font></div></th>
</tr>
<tr bgcolor="#FFFFFF">
<th width="96" align="right" scope="col">Nome:</th>
<th colspan="3" scope="col">
<div align="left">
<input name="nome" type="text" id="nome" maxlength="16" />
</div></th>
</tr>
<tr bgcolor="#FFFFFF">
<th align="right" scope="col"><div align="right">Foto:</div></th>
<th colspan="3" scope="col">
<div align="left">
<input name="arquivo" type="file" id="arquivo" style="style2" size="30" />
</div></th></tr>
<tr bgcolor="#FFFFFF">
<th align="right" scope="col"><div align="right">Contato:</div></th>
<th colspan="3" align="left" scope="col"><textarea name="fone" cols="30" rows="2" id="fone"></textarea></th>
</tr>
<tr bgcolor="#FFFFFF">
<th align="right" scope="col"><div align="right"></div></th>
<th colspan="3" align="left" scope="col"> </th>
</tr>
<tr bgcolor="#FFFFFF">
<th scope="col"><div align="right"></div></th>
<th colspan="3" scope="col"><input type="submit" name="Submit" value="Cadastrar" /></th>
</tr>
</table>
</form>
-
Este e do upload
<style type="text/css">
<!--
body {
background-image: url();
}-->
</style>
<?
require("conectdb.php");
//se existir o arquivo
if(isset($_FILES["arquivo"])){
$arquivo = $_FILES["arquivo"];$pasta_dir = "arquivos/";//diretorio dos arquivos
//se nao existir a pasta ele cria uma
if(!file_exists($pasta_dir)){
mkdir($pasta_dir);
}
$arquivo_nome = $pasta_dir . $arquivo["name"];// Faz o upload da imagem
move_uploaded_file($arquivo["tmp_name"], $arquivo_nome);
//conecta no banco
$arquivo = $_POST['arquivo'];
$id = $_POST['id'];
$nome = $_POST['nome'];
$fone = $_POST['fone'];
$query = "INSERT INTO equipe (arquivo, nome, fone) VALUES ('$arquivo_nome','$nome','$fone')"; // inserção sql na tabela recados
mysql_query($query) or die (mysql_error());mysql_close();//fecha conexão
}
?>
<? echo "<center><font size='3'>Cadastrado com sucesso";
echo "<center><br>";
echo "<img src='$arquivo_nome' width='250'><br>$nome";
?><body bgcolor="#FFFFFF">Discussão (2)
Carregando comentários...