joninho Posted February 28, 2006 at 09:38 PM Report #16033 Posted February 28, 2006 at 09:38 PM Alguem me dis s este code tem problemas? eh k eu alterei umas coisinhas e agr nao aparece nada no I.E. :X <?php if ($nome!=""and $msg!=""){ if ($email! = "" ){ $open=fopen("visitas.txt","a"); $gravar="</br><b>Mensagem:".$msg."<br><br><br><b>De:</b>".$nome."<br><b>E-mail:</b> <nao identificado> <br>".$data."<br>".$separador."<br><br><br>\r\n"; fwrite($open,$gravar); } else { $open=fopen("visitas.txt","a"); $gravar="</br><b>Mensagem:".$msg."<br><br><br><b>De:</b>".$nome."<br><b>E-mail:</b>" .$email. "<br>".$data."<br>".$separador."<br><br><br>\r\n"; fwrite($open,$gravar); } }else{ echo "<b><center><br> *Preenchimento obrigatório</center></b>"; } ?>
francodacosta Posted February 28, 2006 at 10:58 PM Report #16052 Posted February 28, 2006 at 10:58 PM Um erro que vejo ai é na linha 2 if ($email! = "" ){ tens um espaço entre o ! e o = e não podes ter podes sempre activar o show_error e por e error_level para mostrar todos os erros no php.ini ou por este codigo no inicio do script para te ajudar a fazer o debug error_reporting(E_ALL); ini_set('display_errors', true); sven
joninho Posted February 28, 2006 at 11:05 PM Author Report #16055 Posted February 28, 2006 at 11:05 PM What is that :| ? lol, komo eh k ponho isso k dissest? Cumps
francodacosta Posted February 28, 2006 at 11:18 PM Report #16057 Posted February 28, 2006 at 11:18 PM What is that :| ? lol, komo eh k ponho isso k dissest? Cumps Ja tiraste o espaço entre o ! e o = da segunda linha ? o problema esta ai !! mas isso são duas funções de php podes por assim na primeira linha do teu script <?php error_reporting(E_ALL); ini_set('display_errors', true); ?> sven
joninho Posted February 28, 2006 at 11:22 PM Author Report #16058 Posted February 28, 2006 at 11:22 PM nao, amanha vejo isso, tou ah procura dumas cenas sobre o rio mondego lol 😄
Ped@ntilva Posted March 1, 2006 at 01:43 PM Report #16133 Posted March 1, 2006 at 01:43 PM Eu acho mais correcto assim: if (!($nome || $msg)){ if ($email){ blablabla
joninho Posted March 1, 2006 at 02:28 PM Author Report #16141 Posted March 1, 2006 at 02:28 PM e afinal o k eh k o "!" tem a haver cm a conversa? :\
Tiago Salgado Posted March 1, 2006 at 04:13 PM Report #16168 Posted March 1, 2006 at 04:13 PM Tem a ver que se queres ter a condição IF a verificar se a variavel A é diferente de B tens q usar o "!=" ... Se A diferente de B < Portugues corrente If($A != $B) < PHP Percebeste agora o q tem o "!" a ver com a conversa ? 😛
Solution Ped@ntilva Posted March 1, 2006 at 06:11 PM Solution Report #16222 Posted March 1, 2006 at 06:11 PM Por outras palavras: " ! " quer dizer "não" ou "not" Quando tens " != " Quer dizer "não igual" ou "diferente": Percebes-te?
joninho Posted March 1, 2006 at 07:24 PM Author Report #16241 Posted March 1, 2006 at 07:24 PM yah Yah 👍 lol Brigado 😛
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now