Re: [PHP] DateTime... What else ?

2008-04-17 Thread Stut
On 17 Apr 2008, at 10:05, David BERCOT wrote: I've got a problem with DateTime. I have a short code which gives an error : CODE $date = new DateTime(date(d/m/Y)); $date-modify(-1 month); $mois_en_cours1 = $date-format(Y-m); $date-modify(-1 month); $mois_en_cours2 = $date-format(Y-m);

Re: [PHP] DateTime... What else ?

2008-04-17 Thread Simon Welsh
On 17/04/2008, at 9:05, David BERCOT wrote: Hi, I've got a problem with DateTime. I have a short code which gives an error : CODE $date = new DateTime(date(d/m/Y)); $date-modify(-1 month); $mois_en_cours1 = $date-format(Y-m); $date-modify(-1 month); $mois_en_cours2 = $date-format(Y-m);

Re: [PHP] DateTime... What else ?

2008-04-17 Thread David BERCOT
Hi again, Le Thu, 17 Apr 2008 21:10:44 +1200, Simon Welsh [EMAIL PROTECTED] a écrit : On 17/04/2008, at 9:05, David BERCOT wrote: Hi, I've got a problem with DateTime. I have a short code which gives an error : CODE $date = new DateTime(date(d/m/Y)); $date-modify(-1 month);

Re: [PHP] DateTime... What else ?

2008-04-17 Thread David BERCOT
Le Thu, 17 Apr 2008 10:19:10 +0100, Stut [EMAIL PROTECTED] a écrit : On 17 Apr 2008, at 10:05, David BERCOT wrote: I've got a problem with DateTime. I have a short code which gives an error : CODE $date = new DateTime(date(d/m/Y)); $date-modify(-1 month); $mois_en_cours1 =

Re: [PHP] if then else statement not working

2005-05-09 Thread Deep
Hi, Where are the dollar signs before seatnum, seat1 etc in the if condition. ..Deeps.. --- Anasta [EMAIL PROTECTED] wrote: What am i doing wrong here, the output is always 'empty' ?php $result = mysql_query(SELECT username FROM users WHERE seatnum='seat1') or die(mysql_error());

Re: [PHP] if then else

2005-05-06 Thread Richard Lynch
On Wed, May 4, 2005 12:20 am, Anasta said: Can anyone help with a statement, ive tried but it never works. I need to show a value if it is set to a specific value ie: At the moment If a user is logs in a record is updated from 'away' to 'online'---so i want an echo statement to show a value

Re: [PHP] if then else statement not working

2005-05-05 Thread bala chandar
On 5/5/05, Anasta [EMAIL PROTECTED] wrote: What am i doing wrong here, the output is always 'empty' ?php $result = mysql_query(SELECT username FROM users WHERE seatnum='seat1') or die(mysql_error()); if (seatnum == seat1) { you must use if (seatnum == seat1) { echo username; }

Re: [PHP] if then else statement not working

2005-05-05 Thread Gabriel Guzman
Anasta wrote: What am i doing wrong here, the output is always 'empty' ?php $result = mysql_query(SELECT username FROM users WHERE seatnum='seat1') or die(mysql_error()); if (seatnum == seat1) { echo username; } else { echo 'empty'; } ? mysql_query() returns a resource, not the results

Re: [PHP] if then else statement not working

2005-05-05 Thread Philip Hallstrom
What am i doing wrong here, the output is always 'empty' ?php $result = mysql_query(SELECT username FROM users WHERE seatnum='seat1') or die(mysql_error()); if (seatnum == seat1) { echo username; } else { echo 'empty'; } ? Just guessing since I'm not sure what you're trying to do, but... ?php

Re: [PHP] if then else statement not working

2005-05-05 Thread Rasmus Lerdorf
Anasta wrote: What am i doing wrong here, the output is always 'empty' ?php $result = mysql_query(SELECT username FROM users WHERE seatnum='seat1') or die(mysql_error()); if (seatnum == seat1) { echo username; } else { echo 'empty'; } ? That doesn't even look like PHP code. In

Re: [PHP] if then else short form

2005-01-21 Thread Richard Davey
Hello Ben, Friday, January 21, 2005, 12:01:09 PM, you wrote: BE I seem to remember seing someone use a abreaviated form of a BE if/them/else of the type that can be used in java. BE It was something like BE if ( a=b ) ? a=1 ; a=2; BE Anybody know what the correct syntax is? It's called a

Re: [PHP] if then else short form

2005-01-21 Thread Sergio Gorelyshev
On Fri, 21 Jan 2005 12:01:09 + Ben Edwards [EMAIL PROTECTED] wrote: I seem to remember seing someone use a abreaviated form of a if/them/else of the type that can be used in java. It was something like if ( a=b ) ? a=1 ; a=2; Anybody know what the correct syntax is? condition ?

Re: [PHP] if then else short form

2005-01-21 Thread Jochem Maas
Ben Edwards wrote: I seem to remember seing someone use a abreaviated form of a if/them/else of the type that can be used in java. It was something like if ( a=b ) ? a=1 ; a=2; $a = ($a == $b) ? 1: 2; which meand: if $a is equal to $b then set $a to 1 otherwise set $a to 2. that is equivalent to:

Re: [PHP] if then else short form

2005-01-21 Thread Jochem Maas
Ben Edwards wrote: I seem to remember seing someone use a abreaviated form of a if/them/else of the type that can be used in java. It was something like if ( a=b ) ? a=1 ; a=2; I called it the 'tertiary' syntax which is not correct: to quote a page I found: that the book refers to a tertiary

Re: [PHP] if then else short form

2005-01-21 Thread Manoj
language tutorial (basic)... if ( a=b ) ? a=1 ; a=2; a = a==b ? 1 : 2 ; Cheer, Manoj Kr. Sheoran Software Engg. Daffodil Software Ltd. web: www.daffodildb.com INDIA On Fri, 2005-01-21 at 17:31, Ben Edwards wrote: I seem to remember seing someone use a abreaviated form of a

RE: [PHP] iguanahost - anyone else being plagued?

2004-09-15 Thread Gryffyn, Trevor
Yeah, I get tons of them too. Ideally, someone should identify which user subscribed to the list is the culprit and remove their address. -TG -Original Message- From: Nick Wilson [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 15, 2004 11:53 AM To: php-general Subject: [PHP]

Re: [PHP] iguanahost - anyone else being plagued?

2004-09-15 Thread Jim Grill
Anyone else getting these infuriating italian messages about some muppet that doesnt exist? 'desintione non existente'? I've written to [EMAIL PROTECTED] but no joy, everytime i post on the php list i get half a dozen of the damn things... -- Nick W I've been getting those stupid

RE: [PHP] iguanahost - anyone else being plagued?

2004-09-15 Thread Vail, Warren
Could it be that lizards are nocturnal? ;-) Warren Vail -Original Message- From: Jim Grill [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 15, 2004 10:05 AM To: Nick Wilson; php-general Subject: Re: [PHP] iguanahost - anyone else being plagued? Anyone else getting

RE: [PHP] iguanahost - anyone else being plagued?

2004-09-15 Thread Dan Joseph
I've done the same thing. Most likely its an auto-response msg from them after we reply to anything on this list. I can't read the language its in personally. I wrote abuse several times, I get the same msg back. -Dan Joseph -Original Message- From: Nick Wilson [mailto:[EMAIL

Re: [PHP] iguanahost - anyone else being plagued?

2004-09-15 Thread John Holmes
Subject: [PHP] iguanahost - anyone else being plagued? I have a big lizard, if that helps. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] iguanahost - anyone else being plagued?

2004-09-15 Thread Gryffyn, Trevor
exists on their system except to maybe ADD the account back in so it doesn't return an autoresponder or something. -TG -Original Message- From: Dan Joseph [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 15, 2004 1:37 PM To: 'php-general' Subject: RE: [PHP] iguanahost - anyone

Re: [PHP] iguanahost - anyone else being plagued?

2004-09-15 Thread Ron Guerin
Gryffyn, Trevor wrote: It appears to be a user not found type error..'desintione non existente' looks a lot like destination doesn't exist. The guys that manage the PHP-General list need to be made aware so they can remove the offending email address. There's not a lot these iguana guys can

RE: [PHP] iguanahost - anyone else being plagued?

2004-09-15 Thread Gryffyn, Trevor
Fair enough. -Original Message- From: Ron Guerin [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 15, 2004 3:04 PM To: Gryffyn, Trevor Cc: php-general; Dan Joseph Subject: Re: [PHP] iguanahost - anyone else being plagued? Gryffyn, Trevor wrote: It appears to be a user

Re: [PHP] iguanahost - anyone else being plagued?

2004-09-15 Thread Nick Wilson
* and then Gryffyn, Trevor declared It appears to be a user not found type error..'desintione non I must say, im glad it's not just me hehe! I was beginning to think it was just me. I've been away from the list (never a big participant...) for a while but stuff like that used got sorted

RE: [PHP] iguanahost - anyone else being plagued?

2004-09-15 Thread David Robley
On Thu, 16 Sep 2004 04:14, Trevor Gryffyn wrote: It appears to be a user not found type error..'desintione non existente' looks a lot like destination doesn't exist. The guys that manage the PHP-General list need to be made aware so they can remove the offending email address. There's

Re: [PHP] If...Or...Else

2004-07-24 Thread Marcus Strube
?php if ((condition1 == TRUE) OR (condition2 == TRUE)) { do something; } esle { do something else; } ? What's the correct syntax for the If line? if(true == condition1 || true == condition2) { echo Hello World; } else { echo Best Regards; } -- PHP General

Re: [PHP] Nested If...Else...

2004-07-24 Thread Scot L. Harris
On Sat, 2004-07-24 at 12:05, Robb Kerr wrote: What's wrong with this syntax. I just can't see my mistake. if ($vBkgrndImage == AnswerPage) { if ($vAnswerID_RS_PageContent != $row_RS_PageContent['CorrectAnswer']) { $vBkgrndImage = Bkgrnd-Body-Incorrect.jpg; } else {

Re: [PHP] Nested If...Else...

2004-07-24 Thread Robb Kerr
On Sat, 24 Jul 2004 12:09:41 -0400, Scot L. Harris wrote: On Sat, 2004-07-24 at 12:05, Robb Kerr wrote: What's wrong with this syntax. I just can't see my mistake. if ($vBkgrndImage == AnswerPage) { if ($vAnswerID_RS_PageContent != $row_RS_PageContent['CorrectAnswer']) {

Re: [PHP] Nested If...Else...

2004-07-24 Thread Marek Kilimajer
Robb Kerr wrote: On Sat, 24 Jul 2004 12:09:41 -0400, Scot L. Harris wrote: On Sat, 2004-07-24 at 12:05, Robb Kerr wrote: What's wrong with this syntax. I just can't see my mistake. if ($vBkgrndImage == AnswerPage) { if ($vAnswerID_RS_PageContent != $row_RS_PageContent['CorrectAnswer']) {

Re: [PHP] Nested If...Else...

2004-07-24 Thread Robb Kerr
On Sat, 24 Jul 2004 18:18:23 +0200, Marek Kilimajer wrote: Robb Kerr wrote: On Sat, 24 Jul 2004 12:09:41 -0400, Scot L. Harris wrote: On Sat, 2004-07-24 at 12:05, Robb Kerr wrote: What's wrong with this syntax. I just can't see my mistake. if ($vBkgrndImage == AnswerPage) { if

Re: [PHP] Nested If...Else...

2004-07-24 Thread Robb Kerr
On Sat, 24 Jul 2004 12:09:41 -0400, Scot L. Harris wrote: On Sat, 2004-07-24 at 12:05, Robb Kerr wrote: What's wrong with this syntax. I just can't see my mistake. if ($vBkgrndImage == AnswerPage) { if ($vAnswerID_RS_PageContent != $row_RS_PageContent['CorrectAnswer']) {

Re: [PHP] Nested If...Else...

2004-07-24 Thread Jason Davidson
print out all the values of the vars your comparing often youll find one of them is not what your expecting Jason On Sat, 24 Jul 2004 11:05:06 -0500, Robb Kerr [EMAIL PROTECTED] wrote: What's wrong with this syntax. I just can't see my mistake. if ($vBkgrndImage == AnswerPage) { if

Re: [PHP] Nested If...Else...

2004-07-24 Thread Matthew Sims
What's wrong with this syntax. I just can't see my mistake. if ($vBkgrndImage == AnswerPage) { if ($vAnswerID_RS_PageContent != $row_RS_PageContent['CorrectAnswer']) { $vBkgrndImage = Bkgrnd-Body-Incorrect.jpg; } else { $vBkgrndImage = Bkgrnd-Body-Correct.jpg; } } Thanx

Re: [PHP] Nested If...Else...

2004-07-24 Thread Matthew Sims
print out all the values of the vars your comparing often youll find one of them is not what your expecting Jason On Sat, 24 Jul 2004 11:05:06 -0500, Robb Kerr [EMAIL PROTECTED] wrote: What's wrong with this syntax. I just can't see my mistake. if ($vBkgrndImage == AnswerPage) {

Re: [PHP] Nested If...Else...

2004-07-24 Thread Robb Kerr
On Sat, 24 Jul 2004 09:47:52 -0700 (PDT), Matthew Sims wrote: What's wrong with this syntax. I just can't see my mistake. if ($vBkgrndImage == AnswerPage) { if ($vAnswerID_RS_PageContent != $row_RS_PageContent['CorrectAnswer']) { $vBkgrndImage = Bkgrnd-Body-Incorrect.jpg; } else {

Re: [PHP] Nested If...Else...

2004-07-24 Thread Stan F
PM Subject: Re: [PHP] Nested If...Else... On Sat, 24 Jul 2004 09:47:52 -0700 (PDT), Matthew Sims wrote: What's wrong with this syntax. I just can't see my mistake. if ($vBkgrndImage == AnswerPage) { if ($vAnswerID_RS_PageContent != $row_RS_PageContent['CorrectAnswer

Re: [PHP] Nested If...Else...

2004-07-24 Thread Robb Kerr
On Sat, 24 Jul 2004 12:09:41 -0400, Scot L. Harris wrote: On Sat, 2004-07-24 at 12:05, Robb Kerr wrote: What's wrong with this syntax. I just can't see my mistake. if ($vBkgrndImage == AnswerPage) { if ($vAnswerID_RS_PageContent != $row_RS_PageContent['CorrectAnswer']) {

Re: [PHP] if/elseif/else v. switch

2004-06-05 Thread Curt Zirzow
* Thus wrote Dennis Seavers ([EMAIL PROTECTED]): Is there any noticeable difference (on the part of the client) ... The only time the client will perhaps notice a difference is if your condition is in a loop that cycles a couple thousand times or more. Curt -- I used to think I was

RE: [PHP] hmm.. anyone else get a friendly message from Kenneth Uzzi?!

2003-12-04 Thread Jay Blanchard
[snip] Hmm.. I swear I get more spam and crap-mail thanks to posting to this list than from anywhere else! Did anyone else get a wonderfully abusive message from one bonehead kenneth uzzi [EMAIL PROTECTED]? as a result of posting here? [/snip] Nope, but I am getting some bounces from others --

Re: [PHP] Is anybody else getting these??

2003-10-20 Thread David T-G
John, et al -- ...and then John Nichel said... % % Does [EMAIL PROTECTED] need to be removed from the list, or is it % just me? I get nothing from Maurice, but Fabio Farinelli keeps sending me a note whenever I post. HTH HAND :-D -- David T-G * There is too much

Re: [PHP] Is anybody else getting these??

2003-10-20 Thread John Nichel
David T-G wrote: John, et al -- ...and then John Nichel said... % % Does [EMAIL PROTECTED] need to be removed from the list, or is it % just me? I get nothing from Maurice, but Fabio Farinelli keeps sending me a note whenever I post. HTH HAND :-D I recently moved my webserver / mailserver

Re: [PHP] Is anybody else getting these??

2003-10-20 Thread Jon Kriek
Fabio Farinelli keeps sending me a note whenever I post. Indeed, same here. -- Jon Kriek http://phpfreaks.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Is anybody else getting these??

2003-10-20 Thread Nicholas Robinson
I'm feeling left out, I'm not getting any of these. Haven't done since I blocked Hanmir. On Monday 20 Oct 2003 4:11 pm, John Nichel wrote: Does [EMAIL PROTECTED] need to be removed from the list, or is it just me? Original Message Subject: Returned mail: see transcript for

Re: [PHP] WHILE IF/ELSE loop not working

2003-01-24 Thread Rick Emery
Define fails - Original Message - From: Jay Fitzgerald [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, January 24, 2003 3:11 PM Subject: [PHP] WHILE IF/ELSE loop not working can anyone tell me why this while loop fails? == while

Re: [PHP] WHILE IF/ELSE loop not working

2003-01-24 Thread Jason Wong
On Saturday 25 January 2003 05:43, Rick Emery wrote: Define fails - Original Message - From: Jay Fitzgerald [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, January 24, 2003 3:11 PM Subject: [PHP] WHILE IF/ELSE loop not working can anyone tell me why this while loop fails?

RE: [PHP] if elseif else

2002-04-19 Thread Leotta, Natalie (NCI/IMS)
You can use as many elseifs as you need. I'm not sure how it affects performance, but it works (I have one that goes through all 50 states). -Natalie -Original Message- From: Gerard Samuel [mailto:[EMAIL PROTECTED]] Sent: Friday, April 19, 2002 10:02 AM To: PHP Subject: [PHP] if

Re: [PHP] if elseif else

2002-04-19 Thread The_RadiX
Nope.. That is fine.. I use it all the time.. It's quite acceptable.. - Original Message - From: Gerard Samuel [EMAIL PROTECTED] To: PHP [EMAIL PROTECTED] Sent: Saturday, April 20, 2002 12:01 AM Subject: [PHP] if elseif else I redoing some code, and the original author has code

Re: [PHP] elseif without else

2002-02-28 Thread Jeff Sheltren
If you are setting a variable inside of the if statements, and then checking that variable later, then I would say you should either use an else statement to give that variable a default value, or you should set the variable to a default value before the if statements Your code is

Re: [PHP] elseif without else

2002-02-28 Thread Dennis Moore
Perfectly legitimate... it is much like having a switch statement without a default clause. - Original Message - From: Erik Price [EMAIL PROTECTED] To: PHP (E-mail) [EMAIL PROTECTED] Sent: Thursday, February 28, 2002 7:32 PM Subject: [PHP] elseif without else For any of you PHP

RE: [PHP] elseif without else

2002-02-28 Thread Martin Towell
if there's nothing to do in the else block, then it's a bit pointless to have one eg input type=checkbox? if ($blah) echo checked; ? value=xxx name=blah see what I mean? Martin -Original Message- From: Erik Price [mailto:[EMAIL PROTECTED]] Sent: Friday, March 01, 2002 11:32 AM To: PHP

Re: [PHP] elseif without else

2002-02-28 Thread Erik Price
On Thursday, February 28, 2002, at 07:56 PM, Dennis Moore wrote: Perfectly legitimate... it is much like having a switch statement without a default clause. Oh, I didn't know that that was legitimate either. :) Thanks Dennis Erik Erik Price Web Developer Temp Media Lab, H.H.

RE: [PHP] Can If Else statements be split into code blocks??

2001-11-13 Thread Richard Black
Try putting curly brackets around the if and else clauses. I'm guessing the embeded html form counts as another statement in the program, which means you want to execute 2 statements if the strstr is true. I ALWAYS use curly brackets, even if I'm only executing one statemenet in my if, and

Re: [PHP] Is anyone else seeing this everytime they mail to the list?

2001-09-21 Thread Jason Bell
Hmmm Well, the *ONLY* time I get it is when I send email to php-general NoWayMan [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hey I got that message in trying to remove my address from a spammer's list. But I'm not subscribed to the php mailing

Re: [PHP] Is anyone else seeing this everytime they mail to the list?

2001-09-21 Thread Sheridan Saint-Michel
. (Unless you got this message when CC'ing Wee Chua) Sheridan Saint-Michel Website Administrator FoxJet, an ITW Company www.foxjet.com - Original Message - From: Jason Bell [EMAIL PROTECTED] To: PHP Users [EMAIL PROTECTED] Sent: Friday, September 21, 2001 12:24 PM Subject: Re: [PHP] Is anyone

Re: [PHP] Is anyone else seeing this everytime they mail to the list?

2001-09-21 Thread Sheridan Saint-Michel
Hmmm... I got the same bounce message when I sent this message. - Original Message - From: Sheridan Saint-Michel [EMAIL PROTECTED] To: Jason Bell [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Friday, September 21, 2001 1:24 PM Subject: Re: [PHP] Is anyone else seeing this everytime

Re: [PHP] Is anyone else seeing this everytime they mail to the list?

2001-09-21 Thread Jason Bell
Nope. I get it even if php-general is the only address I'm emailing.. - Original Message - From: Sheridan Saint-Michel [EMAIL PROTECTED] To: Jason Bell [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Friday, September 21, 2001 11:24 AM Subject: Re: [PHP] Is anyone else seeing this everytime

RE: [PHP] if then else?

2001-08-18 Thread Glyndower
btw...this is the code i'm trying Please keep the laughter to a minimum...ah heck with it...laugh all you want...its good for ya ?php if ($prof_exp_1 = not null) { ? H4Professional Experience: /H4li ?php printf(mysql_result($result,0,prof_exp_1)); ?br ?php } else if ($prof_exp_1 =

Re: [PHP] IF ELSEIF ELSE??

2001-08-03 Thread Richard Baskett
if (!$HTTP_POST_VARS) exit(); else { if (!$Age) { echo Please enter your age.br\n; } if (!$Email) { echo Please enter your email.br\n; } if (!$State) { echo Please enter your Location.br\n;} if ($Age $Email $State) echo Thanks for your submission.; } Your if and else statements used

[PHP] Re:[PHP] IF ELSEIF ELSE??

2001-08-03 Thread Jack Sasportas
First you should manage your code nicer so that it is easier to read and troubleshoot. Go through this to find my notes... if (!$HTTP_POST_VARS) { exit();} elseif ($HTTP_POST_VARS) { if (!$Age) { echo Please enter your age.br\n; } if Why

Re: [PHP] Re:[PHP] IF ELSEIF ELSE??

2001-08-03 Thread Richard Baskett
Just curious but that last else you told him to put in... what is that referring to? There is already an else statement, you can't have another. Unless you're putting the else statement after the if (!$State) which you would need to subtract the } before the else, but this would give you

Re: [PHP] Re:[PHP] IF ELSEIF ELSE??

2001-08-03 Thread Jack Sasportas
Yes, I see what you mean... In showing why the last section didn't work, I messed up the actual overall logic of the code. I should have noticed that...nice catch so for clarification where it says (MARK) should be echo Thanks for your submission.; } Thanks... Jack Sasportas wrote:

Re: [PHP] if... then... else with HTML

2001-04-23 Thread Martin Thoma
Ah, I forgott the {} ;-) ?php if(strstr($HTTP_USER_AGENT,MSIE)) { ? centerbYou are using Internet Explorer/b/center ? } else { ? centerbYou are not using Internet Explorer/b/center ? } ? Martin Thoma schrieb: Hello ! I want to do something like if (condition) output this html-block

RE: [PHP] if... then... else with HTML

2001-04-23 Thread Taylor, Stewart
?php if (condition) { ? HTML ?php { else { ? HTML ?php } ? -Stewart -Original Message- From: Martin Thoma [mailto:[EMAIL PROTECTED]] Sent: 23 April 2001 13:41 To: [EMAIL PROTECTED] Subject: [PHP] if... then... else with HTML Hello ! I want to do something like if (condition)

Re: [PHP] if... then... else with HTML

2001-04-23 Thread Geir Eivind Mork
On Monday 23 April 2001 14:41, Martin Thoma wrote: if ($word != flat) { echo OUT lot of crap with 's and stories about your mom OUT; } else { echo OUT do the same OUT; } remember not to have anything before or after OUT (or whatever other text you use instead of OUT) or you get prase

RE: [PHP] if... then... else with HTML

2001-04-23 Thread Tyler Longren
? if (condition) { ? 1st HTML here ? } else { ? 2nd HTML here ? } ? -Original Message- From: Martin Thoma [mailto:[EMAIL PROTECTED]] Sent: Monday, April 23, 2001 7:41 AM To: [EMAIL PROTECTED] Subject: [PHP] if... then... else with HTML Hello ! I want to do something like

Re: [PHP] if... then... else with HTML

2001-04-23 Thread Avetis Avagyan
Something like this: ?php if (condition) { ? output this html-block ?php } else { ? output that html-block ?php } ? Regards, Avetis Martin Thoma wrote: Hello ! I want to do something like if (condition) output this html-block else output that html-block Without

Re: [PHP] if... then... else with HTML

2001-04-23 Thread elias
yes, consider this: html body ? if (isset($name)) { ? your name is ?=$name? ? } else { ? h1name is not set!/h1 ? } ? /body /html -elias http://eassoft.cjb.net Martin Thoma [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hello ! I want to do something like

Re: [PHP] if... then... else with HTML

2001-04-23 Thread Richard Crawford
characters. Original Message On 4/23/01, 3:59:41 PM, elias [EMAIL PROTECTED] wrote regarding Re: [PHP] if... then... else with HTML: yes, consider this: html body ? if (isset($name)) { ? your name is ?=$name? ? } else { ? h1name is not set!/h1 ? } ? /body /html -elias http

RE: [PHP] BUG - Someone else please verify B4 I file

2001-04-05 Thread Krznaric Michael
O.k. I understand that, now why would HTTP_POST_VARS be set if no data is posted? Is this desired operation? Mike -Original Message- From: Jeff Carnahan [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 04, 2001 2:18 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] BUG - Someone else please

Re: [PHP] BUG - Someone else please verify B4 I file

2001-04-05 Thread Plutarck
:18 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] BUG - Someone else please verify B4 I file In article 81A3043681E6824EBE672F7421C30E7E2A19A7 @SRVTORONTO.RAND.COM, [EMAIL PROTECTED] says... }if (isset ($HTTP_POST_VARS)){ } echo "Http Post Vars Set"; Remember, just because

Re: [PHP] BUG - Someone else please verify B4 I file

2001-04-04 Thread Data Driven Design
I've noticed that and had to rewrite several scripts when hosts upgraded from PHP3 to PHP4. $HTTP_POST_VARS is considered set even when it is empty. Data Driven Design P.O. Box 1084 Holly Hill, FL 32125-1084 http://www.datadrivendesign.com http://www.rossidesigns.net - Original Message

Re: [PHP] BUG - Someone else please verify B4 I file

2001-04-04 Thread Jeff Carnahan
In article 81A3043681E6824EBE672F7421C30E7E2A19A7 @SRVTORONTO.RAND.COM, [EMAIL PROTECTED] says... }if (isset ($HTTP_POST_VARS)){ } echo "Http Post Vars Set"; Remember, just because a variable is "set", it doesn't imply that the variable has any data stored in it. In this case, while the

Re: [PHP] BUG - Someone else please verify B4 I file

2001-04-04 Thread Andrew Rush
on 4/4/01 5:14 PM, Data Driven Design at [EMAIL PROTECTED] wrote: I've noticed that and had to rewrite several scripts when hosts upgraded from PHP3 to PHP4. $HTTP_POST_VARS is considered set even when it is empty. i have also noticed this. we run 4.0.3pl1 here. have a great day andy --

Re: [PHP] BUG - Someone else please verify B4 I file

2001-04-04 Thread Steve Werby
"Data Driven Design" [EMAIL PROTECTED] wrote: I've noticed that and had to rewrite several scripts when hosts upgraded from PHP3 to PHP4. $HTTP_POST_VARS is considered set even when it is empty. For those that can't guess the solution to this problem I suspect this will do the trick: !

RE: [PHP] Simple If-else statement

2001-03-27 Thread Johnson, Kirk
This code is checking if $fname and $lname are equal to a single blank character. Is this what you want? My guess is you really want if(($fname == "") || ($lname == "")) Another way to write this is if( (!$fname) || (!$lname) ) Kirk -Original Message- From: Louis

Re: [PHP] Simple If-else statement

2001-03-27 Thread Johannes Janson
Hi, if ($name == " ") { checks for a space in $name. "empty" is either if (§name == "") without a free space between "" or you could do it with empty($mane) if (empty($name)) is true if it is empty (who would have thought this?) Johannes "Louis Brooks" [EMAIL PROTECTED] schrieb im

Re: [PHP] Simple If-else statement

2001-03-27 Thread Sterling
H- Another solution might be to use javascript to check the fields before the page is even submitted to make sure they put "something" in the first and last name fields. Unfortunately I'm not a javascript person but I've seen it done so much I'm sure you could find examples on the web or via a

Re: [PHP] Simple If-else statement

2001-03-27 Thread Louis Brooks
Thanks for everyone's response. I am still not able to get the if(($fname="")) { statement to work even with the suggestions everyone made so I am beginning to wonder if it is a problem with the server. (It is php3 on an Apache server. ) Any other suggestions would be greatly appreciated.

Re: [PHP] Simple If-else statement

2001-03-27 Thread Sterling
H- Really, that's strange. Try printing out your variables and seeing what is actually being passed. print "FNAME:$fname:\n"; With the : : colons surrounding your variable you can see what if anything is actually in $fname. Also it might have been a typo on your part but be sure to check

Re: [PHP] Simple If-else statement

2001-03-27 Thread Johannes Janson
Hi Louis, you cuold try it with if (empty($fname)) { redirect... just check again that your form is ok. Johannes "Louis Brooks" [EMAIL PROTECTED] schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Thanks for everyone's response. I am still not able to get the

Re: [PHP] Simple If-else statement - Fixed

2001-03-27 Thread Louis Brooks
Thanks for all the help. I finally got it to work. I ended up using a bunch of if ($lname=="") { statements instead of if (($lname=="") || ($fname=="")) { and that seems to be working. I still can't get the header() statement to work. So I just cheated and put in some text telling the user to

Re: [PHP] Simple If-else statement - Fixed

2001-03-27 Thread Johannes Janson
Hi, for the haeder just make sure that there is NO output whatsoever before the header-call. even if line 1 of your script is empty before the ?php-tag the header doesn't work. "Louis Brooks" [EMAIL PROTECTED] schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Thanks for all