Re: [PHP] If else question

2002-04-23 Thread Jennifer Downey
I have it. I actually got it! I had the if statement in the wrong place. Here is what I did: if($quantity <1) { echo "Sorry I can't seem to locate this item"; } else { //check if form has been submitted if($submit) { } else { //if the form has not been submitted run the following echo ""

Re: [PHP] If else question

2002-04-23 Thread Jason Soza
ril 23, 2002 10:26 am Subject: Re: [PHP] If else question > Ok I have hard coded $quantity so it does = 0 and else still prints. > "Maxim Maletsky )" <[EMAIL PROTECTED]> wrote in message > 004701c1eaf1$c915c6b0$92e3021a@machine52">news:004701c1eaf1$c915c6b0$92e3021a@ma

Re: [PHP] If else question

2002-04-23 Thread Miguel Cruz
prints, then you are missing something in your query. > > Otherwise you've got something wrong in your code. > > > > > > > > > > > > Sincerely, > > > > Maxim Maletsky > > Founder, Chief Developer > > > > www.PHPBeginner.

AW: [PHP] If else question

2002-04-23 Thread Red Wingate
another try. I looks to me as if one row executes the IF and another one the ELSE Statement ( try to let the script die(); after one the first while. red -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Gesendet: Dienstag, 23. April 2002 8:31 PM An: [EMAIL PRO

Re: [PHP] If else question

2002-04-23 Thread heinisch
Aeh, sorry - but is the 1 you test for actual a number or is it a string? I had made this mistakes earlier, so also try if ( $quantity == "1") Maybe I´m absolutely wrong, (PHP 3 knowledge) but Oliver At 23.04.2002 10:48, you wrote: >Ok you asked for it. >Don't say I didn't warn you. > >ses

Re: [PHP] If else question

2002-04-23 Thread Jennifer Downey
've got something wrong in your code. > > > > > > Sincerely, > > Maxim Maletsky > Founder, Chief Developer > > www.PHPBeginner.com // where PHP Begins > > > > > -Original Message----- > From: Jennifer Downey [mailto:[EMAIL PROTECTED]] >

Re: [PHP] If else question

2002-04-23 Thread Jennifer Downey
> > > > ----- Original Message - > > From: Jennifer Downey <[EMAIL PROTECTED]> > > To: <[EMAIL PROTECTED]> > > Sent: Tuesday, April 23, 2002 12:48 PM > > Subject: Re: [PHP] If else question > > > > > > Ok you asked for it.

RE: [PHP] If else question

2002-04-23 Thread Maxim Maletsky \(PHPBeginner.com\)
] If else question Ok you asked for it. Don't say I didn't warn you. session_start(); $query = "SELECT name FROM {$config["prefix"]}_users WHERE uid={$session["uid"]}"; $ret = mysql_query($query); while($row = mysql_fetch_array($ret)) { $user = $row[&#x

Re: [PHP] If else question

2002-04-23 Thread -BD-
n valid data? > > - Original Message - > From: Jennifer Downey <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Tuesday, April 23, 2002 12:48 PM > Subject: Re: [PHP] If else question > > > Ok you asked for it. > Don't say I didn't wa

Re: [PHP] If else question

2002-04-23 Thread Richard Emery
d out all the values fetched via mysql_fetch_array() to ensure they contain valid data? - Original Message - From: Jennifer Downey <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, April 23, 2002 12:48 PM Subject: Re: [PHP] If else question Ok you asked for

RE: [PHP] If else question

2002-04-23 Thread Maxim Maletsky \(PHPBeginner.com\)
TECTED] Subject: Re: [PHP] If else question Ok you asked for it. Don't say I didn't warn you. session_start(); $query = "SELECT name FROM {$config["prefix"]}_users WHERE uid={$session["uid"]}"; $ret = mysql_query($query); while($row = mysql_fetch_array($

RE: [PHP] If else question

2002-04-23 Thread Maxim Maletsky \(PHPBeginner.com\)
: [EMAIL PROTECTED] Subject: Re: [PHP] If else question Ok you asked for it. Don't say I didn't warn you. session_start(); $query = "SELECT name FROM {$config["prefix"]}_users WHERE uid={$session["uid"]}"; $ret = mysql_query($query); while($row = mysql_

RE: [PHP] If else question

2002-04-23 Thread Maxim Maletsky \(PHPBeginner.com\)
ot;; echo ""; echo ""; } ?> - Sincerely, Maxim Maletsky Founder, Chief Developer www.PHPBeginner.com // where PHP Begins -Original Message- From: Jennifer Downey [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 23, 2002

Re: [PHP] If else question

2002-04-23 Thread Jennifer Downey
Ok you asked for it. Don't say I didn't warn you. session_start(); $query = "SELECT name FROM {$config["prefix"]}_users WHERE uid={$session["uid"]}"; $ret = mysql_query($query); while($row = mysql_fetch_array($ret)) { $user = $row['name']; $query = "SELECT uid, id, iname, image, quantity, typ

RE: [PHP] If else question

2002-04-23 Thread Fifield, Mike
] Subject: Re: [PHP] If else question No this is the first if statement but there are nested if's after that. I'd post the code but everyone yells at me about my coding style. If you promise not to yell I will post it. Jennifer "-Bd-" <[EMAIL PROTECTED]> wrote in message 00

RE: [PHP] If else question

2002-04-23 Thread Maxim Maletsky \(PHPBeginner.com\)
]] Sent: Tuesday, April 23, 2002 7:18 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] If else question No this is the first if statement but there are nested if's after that. I'd post the code but everyone yells at me about my coding style. If you promise not to yell I will post it. Jen

RE: [PHP] If else question

2002-04-23 Thread Maxim Maletsky \(PHPBeginner.com\)
r www.PHPBeginner.com // where PHP Begins -Original Message- From: Richard Emery [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 23, 2002 7:41 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Fw: [PHP] If else question OK...this has dragged on... Jennifer, show us your ACTUAL code,

Fw: [PHP] If else question

2002-04-23 Thread Richard Emery
23, 2002 12:17 PM Subject: Re: [PHP] If else question No this is the first if statement but there are nested if's after that. I'd post the code but everyone yells at me about my coding style. If you promise not to yell I will post it. Jennifer "-Bd-" <[EMAIL PROTECTED]> wr

Re: [PHP] If else question

2002-04-23 Thread Jennifer Downey
TECTED]">news:001d01c1eae9$d58f4360$[EMAIL PROTECTED]... > Is this a nested if? (inside another if statement?) > > > > > - Original Message - > From: "Jennifer Downey" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Tuesday, April

Re: [PHP] If else question

2002-04-23 Thread -BD-
Is this a nested if? (inside another if statement?) - Original Message - From: "Jennifer Downey" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, April 23, 2002 1:05 PM Subject: Re: [PHP] If else question > > I just looked at my hosting ser

Re: [PHP] If else question

2002-04-23 Thread Jennifer Downey
then it may be a problem > with your parser. That's not really my area of expertise, but it's > something you could look into if no one else has any better ideas :-) > > -Natalie > > -Original Message- > From: Jennifer Downey [mailto:[EMAIL PROTECTED]] > Sent:

RE: [PHP] If else question

2002-04-23 Thread Leotta, Natalie (NCI/IMS)
expertise, but it's something you could look into if no one else has any better ideas :-) -Natalie -Original Message- From: Jennifer Downey [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 23, 2002 12:26 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] If else question It shows both.

Re: [PHP] If else question

2002-04-23 Thread Jennifer Downey
> -Original Message- > From: Jennifer Downey [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, April 23, 2002 12:23 PM > To: [EMAIL PROTECTED] > Subject: Re: [PHP] If else question > > > > > If and else expect to be followed by exactly 1 statement. To aggregate >

RE: [PHP] If else question

2002-04-23 Thread Leotta, Natalie (NCI/IMS)
Does it show the message and the form or just the message? -Natalie -Original Message- From: Jennifer Downey [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 23, 2002 12:23 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] If else question > If and else expect to be followed by exactl

Re: [PHP] If else question

2002-04-23 Thread Jennifer Downey
> If and else expect to be followed by exactly 1 statement. To aggregate > multiple statements as one, surround them with {curly braces}. I'm > guessing you didn't do that, and you're seeing the execution of all but > the first of the statements following the else. > > So it should be: > > if (

Re: [PHP] If else question

2002-04-23 Thread Miguel Cruz
On Tue, 23 Apr 2002, Jennifer Downey wrote: > I am wondering. When you use an if else statement and a condition exists > isn't the if part suppose to stop? > Then if the condition doesn't exist it is suppose to do something else? > > I am wondering because I have a form that goes something like t

[PHP] If else question

2002-04-23 Thread Jennifer Downey
Hi all, I am wondering. When you use an if else statement and a condition exists isn't the if part suppose to stop? Then if the condition doesn't exist it is suppose to do something else? I am wondering because I have a form that goes something like this. select such and such from the table if

Re: [PHP] If...Else question

2002-03-14 Thread Nick Winfield
On Thu, 14 Mar 2002, Brad Harriger wrote: > > // Now back to the PHP code > >$d = 250; > } > else { >$e = "Does not apply." > } > > ?> > > I have some code similar to this example. When I run the code in my > browser, I get a parse error on the last line (?>). Replace: $e = "Does no

RE: [PHP] If...Else question

2002-03-14 Thread Vlad Kulchitski
l Message- From: Brad Harriger [mailto:[EMAIL PROTECTED]] Sent: 14 ÂÅÒÅÚÎÑ 2002 Ò. 10:52 To: [EMAIL PROTECTED] Subject: [PHP] If...Else question Is it legal for an if...else statement to span PHP code blocks? Here's an example: MORE HTML CODE HERE I have some code similar to

[PHP] If...Else question

2002-03-14 Thread Brad Harriger
Is it legal for an if...else statement to span PHP code blocks? Here's an example: MORE HTML CODE HERE I have some code similar to this example. When I run the code in my browser, I get a parse error on the last line (?>). -- PHP General Mailing List (http://www.php.net/) To u