Jump to content


Inu_yasha's Content

There have been 263 items by Inu_yasha (Search limited from 29/03/2023)



Ordernar por                Order  

#631080 Flog Multiusuário

Posted by Inu_yasha on 29/08/2005, 14:06 in PHP

tens que dar 777 na pasta que queres criar o diretorio.



#631073 Contador Em Php

Posted by Inu_yasha on 29/08/2005, 13:54 in PHP

Olá, estava testando meu contador de php e deu erro:

<?
include "config.php";

$counter = mysql_query("SELECT * FROM $tabela ORDER BY $s DESC", $db);

if ( $counter == 1 ) {
$cadastrar = mysql_query("UPDATE $tabela SET count + 1 WHERE s = '$s'", $db);
$x = mysql_fetch_array($counter);
$coun = $x["count"];
echo " $coun ";
} else {
$cadastrar = mysql_query("INSERT INTO $tabela (s, count) VALUES ('$s', '1')", $db);
$x = mysql_num_rows($counter);
$coun = $x["count"];
echo " $coun ";
}
?>
erro de numrows na linha 13...
$x = mysql_num_rows($counter);
ja tentei por o fetch array, mas deu erro...
alguma solucao?



#627680 Contador De Cliques

Posted by Inu_yasha on 20/08/2005, 11:50 in HTML, CSS e Metodologias

<script>
function soma(div,c){
 x=1+c;
 texts=document.getElementById(div);
 texts.innerHTML = x;
}
</script>
<body>
<a href='#' onClick="soma('resultado',+1)">soma</a>
<div id="resultado"></div>
aqui fica so no dois mesmo.



#627431 Caracteres..

Posted by Inu_yasha on 19/08/2005, 15:55 in HTML, CSS e Metodologias

ainda não deu certop :unsure:
http://darkness.6te.net/ask/faq.php



#627426 Caracteres..

Posted by Inu_yasha on 19/08/2005, 15:45 in HTML, CSS e Metodologias

qual é o charset certo?



#627334 Caracteres..

Posted by Inu_yasha on 19/08/2005, 12:50 in HTML, CSS e Metodologias

eu já tentei com 3 charsets. a camy, minha amiga disse pra eu tentar outro charset e não deu. então não é com html >_>
troquei o charset e NÃO DEU CERTO.



#627152 Caracteres..

Posted by Inu_yasha on 18/08/2005, 21:19 in HTML, CSS e Metodologias

lembrando que isso não é em html, já tentei adicionar uns html, mas foi em vao. irei tentar isso das tabelas acho que amanha. nao tem mais sugestoes?



#627142 Caracteres..

Posted by Inu_yasha on 18/08/2005, 21:02 in HTML, CSS e Metodologias

Olá, visitando um sistyema de ask meu, que anteontem estava normal, eu verifiquei que os ã, ô, etc estão em formato estranho. para verem:
http://darkness.6te.net/ask/faq.php
o que eu faço para arrumar?



#626158 If

Posted by Inu_yasha on 16/08/2005, 19:31 in PHP

o porém é pq o if que eu coloquei pra se a opcao cad estiver marcada, nao funcionar =)
querem uma prova que eu nao coloquei aquele tal email?
http://forum.wmonlin...howtopic=121194
tá aqui, leiam embaixo...



#626113 If

Posted by Inu_yasha on 16/08/2005, 18:22 in PHP

eu ja falei que sem aqueles if de opcao e talz o codigo funciona NORMAL. agora com aqueles ifs nao funciona normal...
$cadastrar = mysql_query("INSERT INTO news (nome, email) VALUES ('$nome', '$email')", $db); = cadastra no bd o email e o nome, eh so ler a função ¬¬
if( $email ) foi o felipensp q arrumo o cod q n tava funcionando com o ER de validar email, ai ele colocou isso...



#626076 If

Posted by Inu_yasha on 16/08/2005, 17:23 in PHP

<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="style.css" type="text/css">

</head>
<body>
<form action="cad.php" method="post">
<table width="100%" border="0" cellspacing="2" cellpadding="2">
<tr> 
<td width="12%"><font size="1" face="Verdana">Seu Nome:</font></td>
<td width="88%"><font size="1" face="Verdana"> 
<input name="nome" type="text" id="nome" class="f1">
</font></td>
</tr>
<tr> 
<td><font size="1" face="Verdana">Seu E-mail:</font></td>
<td><font size="1" face="Verdana"> 
<input name="email" type="text" id="email" class="f1">
</font></td>
</tr>
<tr>
<td>&nbsp;</td>
<td><input name="opcao" type="radio" value="cad"><font size="2">Cadastrar</font></td>
</tr>
<tr>
<td>&nbsp;</td>
<td><input name="opcao" type="radio" value="del"><font size="2">Descadastrar</font></td>
</tr>
<tr> 
<td>&nbsp;</td>
<td><input type="submit" name="Submit" value="Cadastrar" class="f1"></td>
</tr>
</table>
</form>
</body>
</html>
ai tá o formulario para você se cadastrar. custa voltar paginas acima e ver o form? o method eh post.



#626072 If

Posted by Inu_yasha on 16/08/2005, 17:16 in PHP

<?php

include "config.php";

$nome = $_POST['nome'];
$email = $_POST['email'];

if( eregi('^[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+'. '@'. '[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+\.'. '[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+$', $email) )
{
  $cadastrar = mysql_query("INSERT INTO news (nome, email) VALUES ('$nome', '$email')", $db);
}

if( $email )
{
  echo "<script>window.alert('Email cadastrado com sucesso.'); </script>";
  echo "<script>window.location = 'javascript:history.go(-1);'</script>";
}
else
{
  echo "<script>window.alert('Houve um erro ao tentar cadastrar seu email. Tente novamente!'); </script>";
  echo "<script>window.location = 'javascript:history.go(-1);'</script>";
}
?>
sem akeles if de opcao e talz ele funciona normal.... dai eu adicionei os if de opcao pra escolher se quer adicionar ou deletar o email da news!



#626066 If

Posted by Inu_yasha on 16/08/2005, 17:12 in PHP

o felipensp fez isso do ER
if( eregi('^[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+'. '@'. '[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+\.'. '[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+$', $email) )
{
pra validar o email...



#626064 If

Posted by Inu_yasha on 16/08/2005, 17:03 in PHP

<?php

include "config.php";

$nome = $_POST['nome'];
$email = $_POST['email'];

if ($opcao == 'cad') {
if( eregi('^[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+'. '@'. '[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+\.'. '[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+$', $email) )
{
   $cadastrar = mysql_query("INSERT INTO news (nome, email) VALUES ('$nome', '$email')", $db);
}

if( $email )
{
   echo "<script>window.alert('Email cadastrado com sucesso.'); </script>";
   echo "<script>window.location = 'javascript:history.go(-1);'</script>";
}
else
{
   echo "<script>window.alert('Houve um erro ao tentar cadastrar seu email. Tente novamente!'); </script>";
   echo "<script>window.location = 'javascript:history.go(-1);'</script>";
}
}
if ($opcao == 'del') {
$del = mysql_query("DELETE from news (nome, email) VALUES ('$nome', '$email')", $db);
}
?>
eu ja tentei d td, os campos, tem o mesmo nome, mas a pag fik em branco...
pag q cadastra:
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="style.css" type="text/css">

</head>
<body>
<form action="cad.php" method="post">
  <table width="100%" border="0" cellspacing="2" cellpadding="2">
    <tr> 
      <td width="12%"><font size="1" face="Verdana">Seu Nome:</font></td>
      <td width="88%"><font size="1" face="Verdana"> 
        <input name="nome" type="text" id="nome" class="f1">
        </font></td>
    </tr>
    <tr> 
      <td><font size="1" face="Verdana">Seu E-mail:</font></td>
      <td><font size="1" face="Verdana"> 
        <input name="email" type="text" id="email" class="f1">
        </font></td>
    </tr>
	<tr>
	<td>&nbsp;</td>
	<td><input name="opcao" type="radio" value="cad"><font size="2">Cadastrar</font></td>
	</tr>
		<tr>
	<td>&nbsp;</td>
	<td><input name="opcao" type="radio" value="del"><font size="2">Descadastrar</font></td>
	</tr>
    <tr> 
      <td>&nbsp;</td>
      <td><input type="submit" name="Submit" value="Cadastrar" class="f1"></td>
    </tr>
  </table>
</form>
</body>
</html>
faz um mes q n consigo, nem com a documentacao do php eu consegui...



#625258 Melhorando A Qualidade Deste Fórum:

Posted by Inu_yasha on 14/08/2005, 11:02 in Ouvidoria

mas a montanha de paginas de topicos na seção php por exemplo, ja e d++++++, nao tem cmo limparem um pouco ela? qndo vo procurar um topico, tenho q ler uns 50001012125 topicos ate achar...



#625256 Codigo Php Com Extenção Html ?

Posted by Inu_yasha on 14/08/2005, 10:55 in PHP

mas tipo, tem cmo mudar a extensao d .php pra .html se o arquivo tiver INCLUDES e talz?



#624992 Função Em Js Que Verifique Qual O Navegador

Posted by Inu_yasha on 13/08/2005, 08:54 in HTML, CSS e Metodologias

valeu! mas este script funciona em QUALQUER navegador?



#624771 Novo Fórum

Posted by Inu_yasha on 12/08/2005, 16:06 in Ouvidoria

mas da pra fazer uma seção sobre coisas em 3D, efeitos e talz, dai fica os videos nela...



#624761 Função Em Js Que Verifique Qual O Navegador

Posted by Inu_yasha on 12/08/2005, 15:43 in HTML, CSS e Metodologias

o firefox, opera vao ficar no do netscape?



#623023 Validate_email()

Posted by Inu_yasha on 06/08/2005, 23:56 in Artigos, Dicas e Tutoriais de PHP

Felipe, muito obrigado, irei lhe dar os devidos créditos por me ajudar com o validador de email!



#623016 Validate_email()

Posted by Inu_yasha on 06/08/2005, 23:10 in Artigos, Dicas e Tutoriais de PHP

if(eregi( '^[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+'. '@'. '[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+\.'. '[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+$', ($email)) {
$cadastrar = mysql_query("INSERT INTO news (nome, email) VALUES ('$nome', '$email')", $db);

<?php

include "config.php";

$nome = $_POST["nome"];
$email = $_POST["email"];
if(eregi( '^[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+'. '@'. '[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+\.'. '[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+$', ($email)) {
$cadastrar = mysql_query("INSERT INTO news (nome, email) VALUES ('$nome', '$email')", $db);
}
if($email) {
echo "<script>window.alert('Email cadastrado com sucesso.'); </script>";
echo "<script>window.location = 'java script:history.go(-1);'</script>";
} else {
echo "<script>window.alert('Houve um erro ao tentar cadastrar seu email. Tente novamente!'); </script>";
echo "<script>window.location = 'java script:history.go(-1);'</script>";
}
?>


Parse error: parse error, unexpected '{' in c:\appserv\www\news\upload\cad.php on line 7!
mas porque isso? o q eu fiz de errado?



#623008 Validate_email()

Posted by Inu_yasha on 06/08/2005, 22:42 in Artigos, Dicas e Tutoriais de PHP

<?php

include "config.php";

$nome = $_POST["nome"];
$email = $_POST["email"];
$cadastrar = mysql_query("INSERT INTO news (nome, email) VALUES ('$nome', '$email')", $db);
if(eregi( '^[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+'. '@'. '[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+\.'. '[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+$', ($email)) {
if($cadastrar) {
echo "<script>window.alert('Email cadastrado com sucesso.'); </script>";
echo "<script>window.location = 'javascript:history.go(-1);'</script>";
} else {
echo "<script>window.alert('Houve um erro ao tentar cadastrar seu email. Tente novamente!'); </script>";
echo "<script>window.location = 'javascript:history.go(-1);'</script>";
}
?>
so da erro.

Parse error: parse error, unexpected '{' in c:\appserv\www\news\upload\cad.php on line 14!



#622895 Validate_email()

Posted by Inu_yasha on 06/08/2005, 13:15 in Artigos, Dicas e Tutoriais de PHP

function validate_email( $email ) {
  return ( eregi( '^[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+'. '@'. '[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+\.'. '[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+$', $email ) );
}
$cadastrar = mysql_query("INSERT INTO news (nome, email) VALUES ('$nome', '$email')", $db);
if($cadastrar) {
echo "<script>window.alert('Email cadastrado com sucesso.'); </script>";
echo "<script>window.location = 'javascript:history.go(-1);'</script>";
}
else {
echo "<script>window.alert('Houve um erro ao tentar cadastrar seu email. Tente novamente!'); </script>";
echo "<script>window.location = 'javascript:history.go(-1);'</script>";
}
ficaria assim:
function validate_email( $email ) {
  return ( eregi( '^[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+'. '@'. '[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+\.'. '[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+$', $email ) ) {

$cadastrar = mysql_query("INSERT INTO news (nome, email) VALUES ('$nome', '$email')", $db);
if($cadastrar) {
echo "<script>window.alert('Email cadastrado com sucesso.'); </script>";
echo "<script>window.location = 'javascript:history.go(-1);'</script>";
}
else {
echo "<script>window.alert('Houve um erro ao tentar cadastrar seu email. Tente novamente!'); </script>";
echo "<script>window.location = 'javascript:history.go(-1);'</script>";
} else {
echo " email invalido";
}

??



#622838 Validate_email()

Posted by Inu_yasha on 06/08/2005, 09:22 in Artigos, Dicas e Tutoriais de PHP

$nome = $_POST["nome"];
$email = $_POST["email"];
function validate_email( $email ) {
   return ( eregi( '^[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+'. '@'. '[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+\.'. '[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+$', $email ) );
}
$cadastrar = mysql_query("INSERT INTO news (nome, email) VALUES ('$nome', '$email')", $db);
if($cadastrar) {
echo "<script>window.alert('Email cadastrado com sucesso.'); </script>";
echo "<script>window.location = 'javascript:history.go(-1);'</script>";
}

eu n consigo inserir isso:
<?php echo "Email " . (validate_email("guilhermeblanco@dominio.com.br") ? "válido" : "inválido"); ?>
simplesmente não sei onde inserir. e nao entendi o q mais tem q modificar!



#622567 Script Programas De Afiliados

Posted by Inu_yasha on 05/08/2005, 13:32 in PHP

bom, dá pra utilizar os dois separados
o sistema de banners e dps cadastra no contador de cliques
e depois usa a url do contador de cliques pra isso.
entendeu?




IPB Skin By Virteq