Jump to content


Photo

[solved]is my coding logic correct.


  • Please log in to reply
3 replies to this topic

#1 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 12 September 2006 - 10:51 AM

solved


advance thank you.

Is my syntex correct i get a phase error cheers.

i want if the $recor['value'] empty then echo message

cheers


<?php
database connection

$query2="select * from members where name='$name' and password='$password'";
$result2=mysql_query($query2);

while($recor=mysql_fetch_assoc($result2)){


if( (empty($recor['email_activated']))&& (empty($recor['paypal_payment_payed']))&& (empty($recor['paypal_status'])) ){

echo "sorry acctivate your account via email";
}
?>

Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc

#2 Jenk

Jenk
  • Members
  • PipPipPip
  • Advanced Member
  • 778 posts

Posted 12 September 2006 - 11:06 AM

you may want to use || (or) instead of && (and) if you want the user to respond by email if any of the fields are empty.

#3 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 12 September 2006 - 11:11 AM

i didnt ask for a leture on || ors and && i undestand all that i am not stupid JENK i solved the problam i missed a bracket look and see ok.

sorry jenk but you dont seem to exsplain all the code you post in this forum i no your good at what you do and probley a real php auther but the guide lines state that all forum helpers should show examples and exsplain the example in plain english.

advnce thank you.
Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc

#4 Jenk

Jenk
  • Members
  • PipPipPip
  • Advanced Member
  • 778 posts

Posted 12 September 2006 - 11:31 AM

I did explain, in plain English too. You did not - You asked for advice on your logic, I gave advice on your logic.

Also note, this is a public discussion forum. Hence it being open to discussion.

So next time I explain the use of || or && I have to post an example?

Ok.

<?php

$a = 1 || 2;

$b = 1 && 2;

?>

done.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users