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);
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);
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);
$date-modify(-1 month);
$mois_en_cours3 =
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);
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 =
());
if (seatnum == seat1) {
echo username;
} else {
echo 'empty';
}
?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Yahoo! India Matrimony: Find your life
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
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';
}
?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe
;
} else {
echo 'empty';
}
?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
bala balachandar muruganantham
blog lynx http://chandar.blogspot.com
web http://www.chennaishopping.com
--
PHP General Mailing List (http://www.php.net
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
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
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
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 from another table if
they are set to online or
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?
Ben
--
Ben Edwards - Poole, UK, England
WARNING:This email contained partisan views - dont
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
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 ?
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:
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
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
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
--
PHP General Mailing List
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
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
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
PROTECTED]
Sent: Wednesday, September 15, 2004 11:53 AM
To: php-general
Subject: [PHP] iguanahost - anyone else being plagued?
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
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
: Nick Wilson [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 15, 2004 11:53 AM
To: php-general
Subject: [PHP] iguanahost - anyone else being plagued?
Anyone else getting these infuriating italian messages
about some muppet
that doesnt exist?
'desintione non existente
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
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
* 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
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
From time to time I need an If statement that includes an Or condition...
?php
if ((condition1 == TRUE) OR (condition2 == TRUE)) {
do something;
} esle {
do something else;
}
?
What's the correct syntax for the If line?
Thanx
--
Robb Kerr
Digital IGUANA
Helping Digital Artists
?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
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
--
Robb
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 {
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']) {
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']) {
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
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']) {
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
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
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) {
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 {
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
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']) {
* 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
Is there any noticeable difference (on the part of the client) between identical
conditionals, one written as a switch, the other written as an if, elseif ... else
conditional? I realize that one programmer coming in behind another might prefer the
gentler layout of a switch; but would there
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?
--
Best regards,
Richard mailto:[EMAIL
[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
--
Does [EMAIL PROTECTED] need to be removed from the list, or is it
just me?
Original Message
Subject: Returned mail: see transcript for details (Re: [PHP] PHP manual
- multiple HTML pages)
Date: 20 Oct 03 1459 GMT
From: Mailer Daemon [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
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
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
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
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
Irin,
Quite a number of issues here, actually. We'll start with your question
and work from there. Using the checkbox input type=checkbox
name=Cheque value=Cheque as an example, the code you would use to check
if it was set is:
if($_GET['Cheque'] == 'Cheque') {
// The Cheque
May be this line is wrong :
Echo Geen informatie beschikbaar;
may be use this instead...
echo 'Geen informatie beschikbaar';
no?
:)
regards.
[EMAIL PROTECTED] a écrit dans le message de news:
[EMAIL PROTECTED]
Hi,
I'm trying to do the following.. When $stadpict is filled in it must
can anyone tell me why this while loop fails?
==
while ($row = mysql_fetch_array($sql_result)):
$phone = $row[phone];
$date = $row[date];
if ($phone == $_POST[areacode]$_POST[prefix]$_POST[suffix]):
if ($date == NULL):
$date = today;
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
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
You need to give us the HTML for the form so we can comprehend the context
of it all
Eriol [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
I've got the following bit of code for an upload/feedback form.. Upload
isn't a
required field, but name, email and message
Sorry, I didn't figure it was needed, but here is the html info as requested..
Thanks..
form action=? echo $_SERVER['PHP_SELF'] ? method=post
enctype=multipart/form-data name=contact onsubmit=return verifyaddy()
table border=0 cellpadding=0 cellspacing=0 align=center
tr
td align=left
I got this figured out already.. I was having a brain fart and just needed to
move the IF statement with the mail() function further down past a few ELSE
statements.. Thanks anyway..
Take care.. peace..
eriol
Eriol [EMAIL PROTECTED] disgorged:
: I've got the following bit of code for an
I redoing some code, and the original author has code like
if
elseif
elseif
elseif
else
I have always known it to have just one elseif, not multiple ones.
I was going to move it to a switch/case, but there is no common switch.
So I wanted to know if its technically ok, or just ok to use
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
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
Any help with this problem would be greatly appreciated.
I'm running PHP 4.1.2 on Win 2000 and Apache.
The following snippet runs perfectly when I use php_gd.dll but generates a
garbled warning message when I switch the extension to php_gd2.dll. The only
change I make to my setup is the
For any of you PHP legal eagles:
I rtfm'd, but the elseif page doesn't say -- is it okay to have
if ($x) {
// do something
} elseif ($y) {
// do something
} elseif ($z) {
// do something
}
without a final else? My code works fine -- so I know that you -can-
do this. What I was wondering is
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
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
Subject: [PHP] elseif without else
For any of you PHP legal eagles:
I rtfm'd, but the elseif page doesn't say -- is it okay to have
if ($x) {
// do something
} elseif ($y) {
// do something
} elseif ($z) {
// do something
}
without a final else? My code works fine -- so I know that you -can
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.
if, and I've
never had problems with stuff like this.
So...
?php
if (strstr($DomResults,$Match)) {
print Congratulations! $domain.$suffix is available!;
?
form method=POST action=step2.asp name=form2
pinput type=submit value=Register name=B1/p
/form
?php
}
else {
print
RB ?php
RB if (strstr($DomResults,$Match))
RB print Congratulations! $domain.$suffix is available!;
?
RB form method=POST action=step2.asp name=form2
RB pinput type=submit value=Register name=B1/p
RB /form
RB ?php
RBelse
RB print Sorry, $domain.$suffix is already
Every time I send an email to the list, I get a bounce-back. Below are the details...
anyone else see this?
who is [EMAIL PROTECTED]?
Reporting-MTA: dns; mail.aaz-netmarketing.com
Arrival-Date: Fri, 21 Sep 2001 19:02:32 +0200 (CEST)
Final-Recipient: rfc822; [EMAIL PROTECTED]
Action: failed
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
.
(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
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
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
the lines of:
?php if (pe1 = not null) print(Professional Education)? li ?php
printf(pe1)? li ?php printf(pe2)? ?php else (quit and check next set
of optional feilds)?
So the final output would end up like:
Professional Education
* College
* High School
* Middle School
TIA
--
PHP General Mailing
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 = null
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
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
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
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:
Hello !
I want to do something like
if (condition)
output this html-block
else
output that html-block
Without printig or echoing the html-block out (because the block has a
lot of , which I all would have to slash out...)
How can I do that ?
Martin
--
PHP General Mailing List
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
?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
errors.
Or the html/php switiching way, a fraction slower after my tests :)
?if ($world != flat) {?
html
?} else {?
html
?]?
--
php developer / CoreTrek AS| I judge a religion as being good or bad
Sandnes / Rogaland / Norway| based on whether its adherents become
web: http
?
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
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
I hope I understood your question right.
You can do like this
?php
if () {
?
bhtml text/b
?php
else {
?
bother html/b
?php
}
?
-Ursprungligt meddelande-
Fran: Martin Thoma [mailto:[EMAIL PROTECTED]]
Skickat: den 23 april 2001 14:41
Till: [EMAIL PROTECTED]
Amne: [PHP
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
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
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
: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
There seems to be a bug in php 4.0.4pl1, would someone please verify
this script below. If you paste this script into a file called bug.php and
you just call it you will see "Http post Vars Set". However you will not
find that variable it in the output of PHPINFO. I tried this under
-
From: Krznaric Michael [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, April 04, 2001 11:02 AM
Subject: [PHP] BUG - Someone else please verify B4 I file
There seems to be a bug in php 4.0.4pl1, would someone please verify
this script below. If you paste this script into a file called
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
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
--
"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:
!
Hi:
I am trying to set up a simple script that will verify that all the blanks
in a form have been filled out and then submit that to mySQL. If the form
has not been completely filled out I want it to redirect them back to the
original form. I know that the mySQL part of the script works, but
1 - 100 of 108 matches
Mail list logo