Re: [PHP] if(), else() problem!

2006-10-09 Thread Rahul S. Johari
Well actually, all 80 fields (not records) that I'm displaying out of the row (matched by phone number) have to be displayed on the page. Non-Editable. Just displayed for viewing. I am certainly using the query to search dbase and display the results. So technically nothing that I'm doing is caus

Re: [PHP] if(), else() problem!

2006-10-06 Thread Børge Holen
On Friday 06 October 2006 21:59, Rahul S. Johari wrote: > I'm not sure if I understand your point then! I have about 80 fields in > that database that are fetched and displayed on the page using this code. > If there's a simpler way to do this, and have it work the if() else() error > as well, I wo

Re: [PHP] if(), else() problem!

2006-10-06 Thread Richard Lynch
On Fri, October 6, 2006 2:59 pm, Rahul S. Johari wrote: > I'm not sure if I understand your point then! I have about 80 fields > in that > database that are fetched and displayed on the page using this code. > If > there's a simpler way to do this, and have it work the if() else() > error as > well

Re: [PHP] if(), else() problem!

2006-10-06 Thread Richard Lynch
On Fri, October 6, 2006 2:45 pm, Rahul S. Johari wrote: > Well, the actual script doesn't just print "found number" if the > number > exists... It displays all the data from the database of that record, > also > gives an interactive form to update the data and more. None of which is a Good Reason

Re: [PHP] if(), else() problem!

2006-10-06 Thread Richard Lynch
On Fri, October 6, 2006 11:35 am, Rahul S. Johari wrote: > $db = dbase_open("osm.dbf", 0); > if ($db) { > $record_numbers = dbase_numrecords($db); $found = false; > for ($i = 1; $i <= $record_numbers; $i++) { > $row = dbase_get_record_with_names($db, $i); > if ($row['PHONE'] == $theke

Re: [PHP] if(), else() problem!

2006-10-06 Thread Rahul S. Johari
I'm not sure if I understand your point then! I have about 80 fields in that database that are fetched and displayed on the page using this code. If there's a simpler way to do this, and have it work the if() else() error as well, I would love to know about it... On 10/6/06 3:47 PM, "Børge Holen

Re: [PHP] if(), else() problem!

2006-10-06 Thread Børge Holen
On Friday 06 October 2006 21:45, Rahul S. Johari wrote: > Well, the actual script doesn't just print "found number" if the number > exists... It displays all the data from the database of that record, also > gives an interactive form to update the data and more. Yes, and my point is still valid. n

Re: [PHP] if(), else() problem!

2006-10-06 Thread Rahul S. Johari
Well, the actual script doesn't just print "found number" if the number exists... It displays all the data from the database of that record, also gives an interactive form to update the data and more. On 10/6/06 3:25 PM, "Børge Holen" <[EMAIL PROTECTED]> wrote: > Why not check if $thekey is in

Re: [PHP] if(), else() problem!

2006-10-06 Thread Børge Holen
Why not check if $thekey is in the $db, then else echo not found? seems all to much to do so little. On Friday 06 October 2006 18:35, Rahul S. Johari wrote: > Ave, > > code: > > $db = dbase_open("osm.dbf", 0); > if ($db) { > $record_numbers = dbase_numrecords($db); > for ($i = 1; $i <= $record

Re: [PHP] if(), else() problem!

2006-10-06 Thread Rahul S. Johari
Works like a charm!! I was trying something out with having a variable go completely out of the functions & loops and print the "not found" message, but I wasn't hitting it. You did! // ^^^--- now tested ;) On 10/6/06 1:52 PM, "Jochem Maas" <[EMAIL PROTECTED]> wrote: > $msg = 'cannot open data

Re: [PHP] if(), else() problem!

2006-10-06 Thread Rahul S. Johari
Just tried, isn't working! It's doing the same thing that exit; does. Both else { echo "Not Found"; break; } And else { echo "Not Found"; exit; } Do the exact same thing. It will print "not found" (because it checks the first row, and if t

Re: [PHP] if(), else() problem!

2006-10-06 Thread Jochem Maas
Rahul S. Johari wrote: > Ave, > > code: > > $db = dbase_open("osm.dbf", 0); > if ($db) { > $record_numbers = dbase_numrecords($db); > for ($i = 1; $i <= $record_numbers; $i++) { > $row = dbase_get_record_with_names($db, $i); > if ($row['PHONE'] == $thekey) { > echo ³found²;

Re: [PHP] if(), else() problem!

2006-10-06 Thread Jo�o C�ndido de Souza Neto
Usen this: echo ³not found²; break; ""Rahul S. Johari"" <[EMAIL PROTECTED]> escreveu na mensagem news:[EMAIL PROTECTED] Ave, code: $db = dbase_open("osm.dbf", 0); if ($db) { $record_numbers = dbase_numrecords($db); for ($i = 1; $i <= $record_numbers; $i++) { $row = dbase_ge

[PHP] if(), else() problem!

2006-10-06 Thread Rahul S. Johari
Ave, code: $db = dbase_open("osm.dbf", 0); if ($db) { $record_numbers = dbase_numrecords($db); for ($i = 1; $i <= $record_numbers; $i++) { $row = dbase_get_record_with_names($db, $i); if ($row['PHONE'] == $thekey) { echo ³found²; } else { echo ³not found²; }

RE: [PHP] If Else Syntax Incorrect (I Think)

2004-08-13 Thread Ford, Mike [LSS]
On 13 August 2004 12:52, Jay Blanchard wrote: > if( strlen( $UserID ) != 0 > && strlen( $UserPassword ) != 0 > && strlen( $SecretPassword ) != 0 > && strlen( $UserMail ) != 0 ) > { > Do something > } > elseif ( strlen( $UserID ) == 0 > > > strlen( $UserPassword ) == 0 > > > strlen( $SecretPassword

RE: [PHP] If Else Syntax Incorrect (I Think)

2004-08-13 Thread Jay Blanchard
[snip] Can someone help with this please...? if( strlen( $UserID ) != 0 & strlen( $UserPassword ) != 0 & strlen( $SecretPassword ) != 0 & strlen( $UserMail ) != 0 ) { Do something } elseif ( strlen( $UserID ) == 0 or strlen( $UserPassword ) == 0 or strlen( $SecretPassword ) == 0 or strlen( $UserMa

Re: [PHP] If Else Syntax Incorrect (I Think)

2004-08-13 Thread Jason Wong
On Friday 13 August 2004 19:33, Harlequin wrote: > Can someone help with this please...? > > if( strlen( $UserID ) != 0 > & strlen( $UserPassword ) != 0 > & strlen( $SecretPassword ) != 0 > & strlen( $UserMail ) != 0 ) > { > Do something > } > elseif ( strlen( $UserID ) == 0 > or strlen( $UserPassw

[PHP] If Else Syntax Incorrect (I Think)

2004-08-13 Thread Harlequin
Can someone help with this please...? if( strlen( $UserID ) != 0 & strlen( $UserPassword ) != 0 & strlen( $SecretPassword ) != 0 & strlen( $UserMail ) != 0 ) { Do something } elseif ( strlen( $UserID ) == 0 or strlen( $UserPassword ) == 0 or strlen( $SecretPassword ) == 0 or strlen( $UserMail ) ==

[PHP] if..else condition for checkbox

2003-10-01 Thread irinchiang
Hi all, May I just ask how do I do a "if..elseif..else" condition to check if a "checkbox" have been checked. For some reference, I have attached my HTML code and PHP code below: HTML: Payment Mode @import url(receipt.css); Payment Mode: Cash

Re: [PHP] if else while statement speed

2003-09-03 Thread Chris Sherwood
From: "Dan Anderson" <[EMAIL PROTECTED]> To: "PHP List" <[EMAIL PROTECTED]> Sent: Wednesday, September 03, 2003 10:25 AM Subject: [PHP] if else while statement speed > I have a function where I have: > > while (something()) > { &

RE: [PHP] if else while statement speed

2003-09-03 Thread Jay Blanchard
[snip] http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] if else while statement speed

2003-09-03 Thread Dan Anderson
I have a function where I have: would it be quicker to do the above code or: if ($option1) { while(something()) { do_1(); } } elseif ($option2) { while (something()) { do_2(); } } // ... continue for 10 or more options... Thanks, Dan -- PHP General Mailing List (http://www.php.net

Re: [PHP] if else if statement failed...

2003-06-26 Thread Ernest E Vogelsinger
At 22:09 26.06.2003, Scott Fletcher said: [snip] >I am seeing the problem now. It seem that it had to do with the 'OR' >statement inside the elseif statement... I'm going to try a workaround to >it... As for you mentioning about the code... It's too bad t

Re: [PHP] if else if statement failed...

2003-06-26 Thread Scott Fletcher
Just found the problem, the if, else-if, else statement work okay when it is too many. The reason it doesn't work is because there's a loophole in the script due to someone's flaw logic or haven't thought about it when brainstorming... Thanks, Scott "Scott Fletcher" <[EMAIL PROTECTED]> wrote in

Re: [PHP] if else if statement failed...

2003-06-26 Thread Scott Fletcher
I am seeing the problem now. It seem that it had to do with the 'OR' statement inside the elseif statement... I'm going to try a workaround to it... As for you mentioning about the code... It's too bad this message window doesn't properly display the tabs --clip-- if ($firstname == \"\") {

RE: [PHP] if else if statement failed...

2003-06-26 Thread Jay Blanchard
[snip] Noticed something interesting. I was helping to debug someone's programming problem and found that if there is to many 'else if' in the if and else statement then it doesn't work. Have anyone encoutered this problem and know of a workaround to it? [/snip] I'd have to see the code Jay --

RE: [PHP] if else if statement failed...

2003-06-26 Thread Dan Joseph
Hi, >Noticed something interesting. I was helping to debug someone's > programming problem and found that if there is to many 'else if' in the if > and else statement then it doesn't work. Have anyone encoutered this > problem and know of a workaround to it? That sounds kinda bizzar

[PHP] if else if statement failed...

2003-06-26 Thread Scott Fletcher
Hi! Noticed something interesting. I was helping to debug someone's programming problem and found that if there is to many 'else if' in the if and else statement then it doesn't work. Have anyone encoutered this problem and know of a workaround to it? Thanks, Scott -- PHP General Mailin

Re: [PHP] If else.. display no picture..

2003-04-05 Thread Rasmus Lerdorf
I would help if you told us which line the error was on On Sat, 5 Apr 2003 [EMAIL PROTECTED] wrote: > Hi, > > I'm trying to do the following.. When $stadpict is filled in it must display the > picture (only the path to the picture is stored in Mysql). But when the string > ($stadpict) is empty

RE: [PHP] If else.. display no picture..

2003-04-05 Thread John W. Holmes
> I'm trying to do the following.. When $stadpict is filled in it must > display the picture (only the path to the picture is stored in Mysql). But > when the string ($stadpict) is empty then it must not display the picture > (and also not display a box with a red cross in it (can't display picture

[PHP] If else.. display no picture..

2003-04-05 Thread fkeessen
Hi, I'm trying to do the following.. When $stadpict is filled in it must display the picture (only the path to the picture is stored in Mysql). But when the string ($stadpict) is empty then it must not display the picture (and also not display a box with a red cross in it (can't display picture

Re: [PHP] If... Else.. I'm not getting it!

2003-01-25 Thread Jason Wong
On Saturday 25 January 2003 19:18, Frank Keessen wrote: > Hi, > > The register_globals = Off. Dit the basic echo ($submit) but it displays > nothing.. > > Any thoughts somebody?? > > If register_globals is not enabled then you need to use $_POST['submit'] > > (just > > > as you had to use $_POST['

Re: [PHP] If... Else.. I'm not getting it!

2003-01-25 Thread Frank Keessen
Sent: Saturday, January 25, 2003 12:42 PM Subject: RE: [PHP] If... Else.. I'm not getting it! > You are using the post method not get so $_GET[] should be empty. > > Does this version of your code work? > > if(isset($_POST['submit'])) { > $vname=$_POST[

RE: [PHP] If... Else.. I'm not getting it!

2003-01-25 Thread Rich Gray
You are using the post method not get so $_GET[] should be empty. Does this version of your code work? Input yourname Rich -Original Message- From: Frank Keessen [mailto:[EMAIL PROTECTED]] Sent: 25 January 2003 11:33 To: Johannes Schlueter; [EMAIL PROTECTED] Subject: Re: [PHP] If

Re: [PHP] If... Else.. I'm not getting it!

2003-01-25 Thread Frank Keessen
iginal Message - From: "Johannes Schlueter" <[EMAIL PROTECTED]> To: "Frank Keessen" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Saturday, January 25, 2003 12:25 PM Subject: Re: [PHP] If... Else.. I'm not getting it! Hi, On Saturday 25 January 2003 12:

Re: [PHP] If... Else.. I'm not getting it!

2003-01-25 Thread Johannes Schlueter
Hi, On Saturday 25 January 2003 12:18, Frank Keessen wrote: > The register_globals = Off. Dit the basic echo ($submit) but it displays > nothing.. > > Any thoughts somebody?? Switch on register_globals or (better!) use $_GET['submit'], $_POST['submit'] or $_REQUEST['submit']. > Thanks for helpi

Re: [PHP] If... Else.. I'm not getting it!

2003-01-25 Thread Frank Keessen
IL PROTECTED]> Sent: Saturday, January 25, 2003 11:36 AM Subject: Re: [PHP] If... Else.. I'm not getting it! > On Saturday 25 January 2003 18:27, Frank Keessen wrote: > > > But when i'm using IF Else.. Nothing is happening. I'm only seeing the form > >

Re: [PHP] If... Else.. I'm not getting it!

2003-01-25 Thread Jason Wong
On Saturday 25 January 2003 18:27, Frank Keessen wrote: > But when i'm using IF Else.. Nothing is happening. I'm only seeing the form > but when i submit that form: The $vname doen't display.. > > Here is the code that doesn't work: > > $vname=$_POST['vname']; > if($submit) { Try some basic debu

[PHP] If... Else.. I'm not getting it!

2003-01-25 Thread Frank Keessen
Hi all, Please can you help me with the following: If got a little sample code: This one is working (!): Input yourname But when i'm using IF Else.. Nothing is happening. I'm only seeing the form but when i submit that form: The $vname doen't display.. Here is the code that doesn't wo

[PHP] if/else & mail() problem..

2002-08-25 Thread eriol
I've got the following bit of code for an upload/feedback form.. Upload isn't a required field, but name, email and message are.. When someone submits this form with an upload used, it works fine.. But if an upload is excluded and they only fill in the required fields, I don't get an email.. I'm

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

Re: [PHP] If/else conditional statement ...

2001-12-23 Thread Casey Allen Shobe
On Sunday 23 December 2001 03:11 pm, Robert Dyke wrote: > <% If $varA == True Then %> > Straight HTML in here that only displays if $varA == True > <% Else %> > Straight HTML in here that only displays if $varA != True > <% End if %> $varA was true. $varA was false. I heavily dislike this cod

Re: [PHP] If/else conditional statement ... in an include file ...

2001-12-23 Thread Robert Dyke
I apologize for not including all of the information. I did this as an include file, which explains why it isn't working: < !--- beginning of myinclude.php > < ! --- end of myinclude.php --- > < ! beginning of testfile.php --- > Html here that should display only if $varA == Tr

Re: [PHP] If/else conditional statement ...

2001-12-23 Thread Michael Sims
At 01:11 PM 12/23/2001 -0700, Robert Dyke wrote: >Hello: > >In ASP I can write a Conditional statement like this: > ><% If $varA == True Then %> >Straight HTML in here that only displays if $varA == True ><% Else %> >Straight HTML in here that only displays if $varA != True ><% End if %> > >Transl

Re: [PHP] If/else conditional statement ...

2001-12-23 Thread Bogdan Stancescu
Took a better look at your code -- you've capitalized "true" -- that may be it. Bogdan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]

Re: [PHP] If/else conditional statement ...

2001-12-23 Thread Miles Thompson
What's the error, just a parse error on line xx? O tend to do a lot of echo 'ing, so this suggestion may not be much help. How about adding a semicolon? Miles At 01:11 PM 12/23/2001 -0700, Robert Dyke wrote: >Hello: > >In ASP I can write a Conditional statement like this: > ><% If $varA == True

Re: [PHP] If/else conditional statement ...

2001-12-23 Thread Bogdan Stancescu
Make sure you close the accolade afterwords in PHP -- other than that, yes, it works just fine! For example this should work just fine: - Found a multiple of three! -- Bogdan Robert Dyke wrote: > Hello: > > In ASP I can write a Conditional statement like this: > > <% If $va

[PHP] If/else conditional statement ...

2001-12-23 Thread Robert Dyke
Hello: In ASP I can write a Conditional statement like this: <% If $varA == True Then %> Straight HTML in here that only displays if $varA == True <% Else %> Straight HTML in here that only displays if $varA != True <% End if %> Translating this to PHP doesn't work: // error is generated he

RE: [PHP] if else and or ?

2001-05-07 Thread Maxim Maletsky
: Friday, April 27, 2001 12:58 PM To: [EMAIL PROTECTED] Subject: [PHP] if else and or ? Hello, I started to do a php page with mysql connection.. My problem is: I do query from a mysql, I try to setup usernames + passwords to protect the database They would need to use specific user+password

[PHP] if else and or ?

2001-05-07 Thread Andras Kende
Hello, I started to do a php page with mysql connection.. My problem is: I do query from a mysql, I try to setup usernames + passwords to protect the database They would need to use specific user+password+cities to be able to connect. Bad passwd would just print an access denied messsage.. ht

Re: [PHP] if ... else ...

2001-01-26 Thread Toby Butzon
I'm not sure if I'm understanding correctly, but you might take a look at this modification... Notice: all lines with a > in front of them have remained unchanged. Lines that can safely be deleted are preceeded by single-line comments (//), and lines without a > are newly added lines. $allFields

[PHP] if ... else ...

2001-01-26 Thread Chakravarthy K Sannedhi
Hi all, I am having 5 rows in a mysql database related to five different users. these rows contains their firstname, lastname and details of scenes 1 to 5(these details are numeric values from 1 to 3). if any of these fields from scenes 1 to 5 are empty that will be detected from the firstname of