- Fórum WMO
- → Pipoka's Content
Pipoka's Content
There have been 11 items by Pipoka (Search limited from 22/05/2023)
#1007316 Update Não Atualiza
Posted by Pipoka on 27/01/2011, 16:32 in MySQL
Estou fazendo uma area em que eu posso postar novas aberturas para o meu site. O problema é que as tabelas não estão atualizando, quando eu coloco alterar aparece "Operação realizada com sucesso" mais a tabela não é alterada.
Vo passar os codigos para vocês.
Seleciona Alterar
<body>
<form name="alterar" method="post" action="index.php?link=5">
Selecione uma Abertura:
<select name="selecao" size="1" id="selecao">
<?php
$sql = "SELECT numero FROM aberturas order by numero";
$resultado = mysql_query($sql) or die ("Não foi possível realizar a consulta, verifique a conexão");
while ($registro = mysql_fetch_array($resultado))
{
?>
<option> <?=$registro["numero"]?> </option>
<?php
}
mysql_free_result($resultado);
?>
</select>
<input name="ok" type="submit" value="OK">
</body>
Formulário de alteração
<?php
include("conexao.php");
$numero_alterar = $_POST["selecao"];
$sql = "SELECT * FROM aberturas WHERE numero ='$numero_alterar'";
$resultado = mysql_query($sql) or die ("Não foi possível executar a consulta");
$linha = mysql_fetch_array($resultado);
$codigo = $linha[id_abertura];
$imagem = $linha[imagem];
$numero = $linha[numero];
$musica = $linha[musica];
$artista = $linha[artista];
$qualidade = $linha[qualidade];
$formato = $linha[formato];
$tamanho = $linha[tamanho];
$megaupload = $linha[megaupload];
$easyshare = $linha[easyshare];
$mediafire = $linha[mediafire];
$shared = $linha[shared];
?>
e os VALUES mais vai ficar muito grande se eu colocar aqui, mas até aqui ta tudo certo, agora a página que eu axo que ta o erro.
Alterar.php
<?php
include("conexao.php");
$codigo = $_POST[codigo];
$numero = $_POST[numero];
$musica = $_POST[musica];
$artista = $_POST[artista];
$qualidade = $_POST[qualidade];
$formato = $_POST[formato];
$tamanho = $_POST[tamanho];
$megaupload = $_POST[megaupload];
$easyshare = $_POST[easyshare];
$mediafire = $_POST[mediafire];
$shared = $_POST[shared];
$sql ="
UPDATE aberturas SET
numero = '$numero',
musica = '$musica',
artista = '$artista',
qualidade = '$qualidade',
formato = '$formato',
tamanho = '$tamanho',
megaupload = '$megaupload',
easyshare = '$easyshare',
mediafire = '$mediafire',
shared = '$shared'
WHERE id_abertura = '$codigo'
";
$query = mysql_query($sql) or die (mysql_error());
print "Operação realizada com sucesso!";
?>
Desde já agradeço pela ajuda
#1009059 Trabalho Freelancer
Posted by Pipoka on 07/04/2011, 20:22 in Vagas
ATENÇÃO: Conversar online, nada de e-mails.
Repetindo o e-mail para contato :: marcelo_loureiro13@hotmail.com
#1007317 Gravar Link Em Banco De Dados
Posted by Pipoka on 27/01/2011, 16:42 in MySQL
Crio um formulário normal em uma página separada.
EX:
INSERIR.HTML
<form name="link" action="gravar.php" method="post">
Seu Link: <input name="link" type="text" maxlength="200">
</form>
Cria a página que manda pro banco de dados
EX:
GRAVAR.PHP
<?php
include("conexao.php"); //Vai fazer a conexão com seu servidor
$link = $_POST["link"]; //Pega o link que você enviou atraves do formulário
$sql = "INSERT INTO suatabela(link} VALUES('$link')"; // Inseri o seu link na tabela.
$query = mysql_query($sql) or die (mysql_error());
?>
Espero ter ajudado
#1012877 Freelancer Para Designer De Site De Animes
Posted by Pipoka on 22/08/2011, 08:01 in Profissionais
entrar em contato: marcelo_loureiro13@hotmail.com
#1011767 Free Para Desgin De Site De Animes
Posted by Pipoka on 12/07/2011, 10:01 in Vagas
admarceloloureiro@gmail.com ou marcelo_loureiro13@hotmail.com
OBS: Grande chance de continuação com novos projetos e vou querer as imagens também.
#1004344 Cutenews
Posted by Pipoka on 08/10/2010, 09:11 in PHP
Link do Template: http://www.bleachpower.net/teste.php
Código do Template:
<table width="450" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td colspan="2"><img src="http://www.bleachpow...magem/lanc.gif" width="200" height="30"></td>
</tr>
<tr>
<td width="114" height="60" align="center" valign="middle" bgcolor="#666666"><img src="http://www.bleachpow...gem/bplogo.gif" width="100" height="100"></td>
<td width="336" bgcolor="#666666">POR: Pipoka<br>
Assunto: Bleach 291<br>
Data: 06/10/2010</td>
</tr>
<tr>
<td colspan="2" align="center" bgcolor="#666666"><p><br>
<span class="letratopo">Episódio Bleach 291 para Download. </span><br>
<br>
Bom dia a todos, to colocando agora no site para vocês o episódio 291 gostaria de pedir desculpas pelo atraso.</p>
<p><img src="http://www.bleachpow...lomaisfoto.gif" width="400" height="80" align="center"></p>
<table background="http://www.bleachpow...magem/meio.gif" repeat="no-repeat" width="400" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="149" height="205" align="center" valign="top"><p> </p>
<p class="testonew"><br>
Titulo: Confronto<br>
com Aizen.</p>
<p class="testonew">Tamanho: 80 mb</p>
<p class="testonew">Formato: MP4</p></td>
<td width="82" align="center" valign="top"><p> </p>
<p> </p>
<p><img src="http://www.bleachpow...gem/btdown.gif" width="50" height="50"><br>
</p></td>
<td width="169" align="left" valign="top"><p> </p>
<p><br>
<img src="http://www.bleachpow...magem/mega.gif" width="16" height="16"> <span class="testonew"><a href="http://www.megauploa...</a></span></p>
<p><span class="testonew"><a href="http://www.4shared.c...owernet.html">4 shared</a></span></p>
<p> </p>
<p><br>
</p></td>
</tr>
</table>
<table width="400" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="125" bgcolor="#333333"><!-- AddThis Button BEGIN -->
<div class="addthis_toolbox addthis_default_style">
<a href="http://www.addthis.c...ae038b191172f3" class="addthis_button_compact">Share</a>
<span class="addthis_separator">|</span>
<a class="addthis_button_preferred_1"></a>
<a class="addthis_button_preferred_2"></a>
<a class="addthis_button_preferred_3"></a>
<a class="addthis_button_preferred_4"></a>
</div>
<script type="text/javascript" src="http://s7.addthis.co...72f3"></script>
<!-- AddThis Button END -->
</td>
<td width="275" bgcolor="#333333"><a href="online.html"><img src="http://www.bleachpow...gem/online.gif" width="274" height="30"></a></td>
</tr>
</table>
<p> </p></td>
</tr>
</table>
Desde já, agredeço a todos que me ajudarem!
- Fórum WMO
- → Pipoka's Content
- Privacy Policy
- Regras ·