hmmm
the question too is where do the variables get assigned and where is the
"form" or the query statements to the database for the info you need to
print out... maybe its something with that...


----- Original Message -----
From: "Stitchin'" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, February 28, 2003 2:03 PM
Subject: Very basic If statement still not working VERIFIED VARIABLES


> Here's what I've got in my form:
>
>     echo "<td><ul><LI><b>{$row['designname']}</LI></b>
>                          <LI><small>{$row['designfile']}</LI>
>                          <LI>{$row['designcomments']}</LI>
>                          <LI>{$row['applique']} Applique</LI>
>                          <LI>{$row['puffyfoam']} Puffy Foam</LI>
>                          <LI>$message1</LI></td></ul>\n";
>
> The three designs are coming up:
> 1 0 1 Applique
> 1 1 0 Puffy Foam
> oops oops oops message1
>
> This just doesn't make any sense!
>
>
> -----Original Message-----
> From: Roger Davis [mailto:[EMAIL PROTECTED]
> Sent: Friday, February 28, 2003 12:50 PM
> To: [EMAIL PROTECTED]
> Subject: RE: Very basic If statement still not working ????
>
>
> Why don't you verify what the values are in the variables.  If the
Variables
> are not getting set then you would always see the "oops" in your
statement.
> Try...
>
> echo $applique;
> echo $puffyfoam;
>
> Hope this helps
> Roger
> -----Original Message-----
> From: Stitchin' [mailto:[EMAIL PROTECTED]
> Sent: Friday, February 28, 2003 12:01 PM
> To: [EMAIL PROTECTED]
> Subject: Very basic If statement still not working ????
>
>
> Boy, this is getting real frustrating ... doesn't this seem to be child's
> play?  I'm not trying to do anything fancy ... I tried the && and
> parentheses suggested  below and it still didn't work.  I even tried to
put
> quotes around the zeros and ones thinking maybe the program wasn't
> recognizing that they were numbers and it still didn't work ????
>
> -----Original Message-----
>      The PHP logical AND operator is &&.
>
>      Try
>          if(($applique == 1) && ($puffyfoam == 0))  etc.
>
>      HTH,
>      Tore.
>
> ----- Original Message -----
> >
> > This is so simple and basic, I must be missing something....
> >
> > I have php code for displaying my embroidery designs on the web page.
It's
> > going through the mySql database and the query to pull up all the
designs
> > for a chosen category works fine.  I have two fields in my database
> > called "applique" and "puffyfoam" both are set up as tinyint(1)
> > because all I'm storing there is a zero for no and a 1 for yes.
> >
> > But for the screen output I don't want these codes to show, I'd like a
> com-
> > ment to show up.  So I set up this "if" statement to place the proper
> state-
> > ment in a variable to be used in my echo statement (if both answers are
> no,
> > I don't want to print oops, I just put that there to see where stuff was
> > happening)...
> >
> >
> > if($applique == 1 and $puffyfoam == 0)
> >        {
> >           $message1 = "Digitized for APPLIQUE";
> >        }
> >        elseif($applique == 0 and $puffyfoam == 1)
> >        {
> >           $message1 = "Digitized for PUFFY FOAM";
> >        }
> >        elseif($applique == 1 and $puffyfoam == 1)
> >        {
> >           $message1 = "Digitized for APPLIQUE and PUFFY FOAM";
> >        }
> >        else
> >        {
> >           $message1 = "oops";
> >        }
> >
> > I have three records in this category that I've set up with answers to
the
> > two fields as 1,1 0,1 and 1,0 to see what message would show .... none
> > should show up as "oops" since none are 0,0.  I've also put the
"applique"
> > raw field data in my echo to see if it is pulling up the right answer as
> > well ...
> >
> > The field is showing the correct field info for applique, they're
showing
> up
> > as 1,0,1 BUT every one of the designs are showing the message "oops".
> What
> > am I doing wrong???
> >
> > TIA
> > Renee :)
>
>
>
> ---------------------------------------------------------------------
> Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail
> <[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>
>
> ---------------------------------------------------------------------
> Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail
> <[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>
>
>
>
>
> ---------------------------------------------------------------------
> Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail
<[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>
>


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.458 / Virus Database: 257 - Release Date: 2/24/2003


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to