editorpa 0 Denunciar post Postado Julho 15, 2010 ola esse e meu codigo <?php $dominio=$_POST[dominio]; $nome=$_POST[nome]; $cpf=$_POST[cpf]; $cep=$_POST[cep]; $select2=$_POST[select2]; //Sql // Parâmetros de conexão $server = "localhost"; $usuario = "roon"; $senha = ""; $basedados = mysql_select_db('editorpan_adminlogin'); // Tenta efetuar a conexão $conexao = @mysql_connect($server, $usuario, $senha); // Testa se a conexão foi efetuada com sucesso if(!$conexao) die('Falha ao conectar: ' . mysql_error()); //vistoria ao BD $RA = mysql_query("SELECT * FROM `clientes` WHERE nome = '$nome'"); $REA = mysql_num_rows($RA); $login = mysql_result ($RA,0,"login"); $senha = mysql_result ($RA,0,"senha"); $destinatario = mysql_result ($RA,0,"email"); if ($RA ==1) { $RE = mysql_query("SELECT * FROM `dadosclientes` WHERE cpf = '$cpf'"); $REE = mysql_num_rows($RE); } if ($RE ==1) { $RI = mysql_query("SELECT * FROM `infclientes` WHERE dominio = '$dominio'"); $REI = mysql_num_rows($RI); } if ($RA,$RE,$RI ==1) { $acao ='ok'} if ($acao = 'ok') { //função mail $mensagem = '<TABLE border=0 width=600 align=center> <TBODY> <TR> <TD colSpan=2><IMG border=0 src="topohost.png" width=600 height=99></TD></TR> <TR> <TD width=302 align=middle> <P>Usuario:<?php print $login ?></p> </TD> <TD width=294 align=middle>Senha:<?php print $senha ?></TD></TR></TBODY></TABLE>'; $header = "MIME-Version: 1.0\n"; $header .= "Content-type: text/html; charset=iso-8859-1\n"; mail($destinatario,"Recuperação de Senha", $mensagem, $header); } ?>Esta com erro na linha 38 ',' if ($RA,$RE,$RI ==1) { $acao ='ok'} Compartilhar este post Link para o post Compartilhar em outros sites
Daniel Ribeiro 4 Denunciar post Postado Julho 15, 2010 Faça assim: if ($RA == 1 && $RE == 1 && $RI ==1) { $acao = 'ok'; } Compartilhar este post Link para o post Compartilhar em outros sites