On Dec 31, 2008, at 5:55 PM, Brian Dunning wrote:
... When I hit Reply or Reply All in Mail, it wants to
reply directly to the poster, and only CC's the list...
That is just the way the list works. (If you look at threads, you
will see a fairly-constant stream of reminders to reply all to
I use Apple Mail, and subscribe to many lists but PHP-General is the
only one I have this problem with. People tell me that my replies are
not properly threaded to the original post. When I hit Reply or Reply
All in Mail, it wants to reply directly to the poster, and only CC's
the list. So
Paul Scott wrote:
On Tue, 2008-02-05 at 13:29 -0500, Daniel Brown wrote:
Still debating what
device I'll get next, but I want to use it as a mobile server myself.
I had been working on a bound-for-trash PDA doing the same a while
back, but with what we'll refer to as limited results.
I
Hi,
I've recently installed PAMP (PHP, Apache, MySQL Python) on my Nokia N95.
I can do my development in Dreamweaver and move across to the phone and it
all works.
I have some questions, but won't bother asking if there's no-one else here
doing it.
Cheers
George, in a very wet Edinburgh
--
On Tue, 2008-02-05 at 14:44 +, George Pitcher wrote:
I've recently installed PAMP (PHP, Apache, MySQL Python) on my Nokia N95.
I can do my development in Dreamweaver and move across to the phone and it
all works.
Sounds intruiging! Care to share some resources/links as to how to set
On Feb 5, 2008 9:50 AM, Paul Scott [EMAIL PROTECTED] wrote:
On Tue, 2008-02-05 at 14:44 +, George Pitcher wrote:
I've recently installed PAMP (PHP, Apache, MySQL Python) on my Nokia N95.
I can do my development in Dreamweaver and move across to the phone and it
all works.
Sounds
More info can be found here... When I get my Nokia N82 I am going to try
it out.
http://wiki.opensource.nokia.com/projects/PAMP
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Tue, 2008-02-05 at 13:29 -0500, Daniel Brown wrote:
Still debating what
device I'll get next, but I want to use it as a mobile server myself.
I had been working on a bound-for-trash PDA doing the same a while
back, but with what we'll refer to as limited results.
I think that the key
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
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²;
}
}
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 =
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²;
}
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 the
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 database!';
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_numbers;
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 the
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. need
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
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'] == $thekey) {
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 to
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, I
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 would
to: 'php-general@lists.php.net'
from: Leonidas Savvides
Please see my problem below in PHP code :
_
?php
echo $month, $day, $year, $month2, $day2, $year2;// these are
ok-normal values from web form
if ( ! @checkdate($month,$day,$year) ) {
echo this operate
In PHP you should write it as } elseif {, so there's no space
between else and if.
Read http://php.net/elseif for more details
On Tue, 22 Mar 2005 22:48:00 +0200, Leonidas Savvides
[EMAIL PROTECTED] wrote:
to: 'php-general@lists.php.net'
from: Leonidas Savvides
Please see my problem
read the manual, you can use both (else if and elseif).
The script does exactly what you tell it to. The flaw(s) is(/are) in
your logic. Second of all, might I please advise you to have a good look
at your code, and at least *try* to clean it up a bit? I'm sure you
didn't mean it like this, but
On Tue, March 22, 2005 1:47 pm, M. Sokolewicz said:
read the manual, you can use both (else if and elseif).
The script does exactly what you tell it to. The flaw(s) is(/are) in
your logic.
else if and elseif are not exactly the same, as the manual indicates
(and glosses over a bit).
The will
We've been getting the following error:
[error] PHP Parse error: parse error, unexpected T_SL in
/foo/bar.php on line 136
(where foo and bar obviously are stand-ins for real values).
The weird thing is that the file generating the error, bar.php, DOESN'T
contain any heredoc quotations. bar.php
On Thu, 25 Nov 2004 12:17:01 +, D. D. Brierton [EMAIL PROTECTED] wrote:
We've been getting the following error:
[error] PHP Parse error: parse error, unexpected T_SL in
/foo/bar.php on line 136
Can you post some of this code? Are all your heredoc instances
completely left justified?
On Thu, 25 Nov 2004 06:26:22 -0600, Greg Donald wrote:
On Thu, 25 Nov 2004 12:17:01 +, D. D. Brierton [EMAIL PROTECTED] wrote:
We've been getting the following error:
[error] PHP Parse error: parse error, unexpected T_SL in
/foo/bar.php on line 136
Can you post some of this code?
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 ) == 0
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( $UserPassword ) == 0
[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( $UserMail
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 ) == 0
strlen(
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:
html
head
titlePayment Mode/title
style type=text/css
@import url(receipt.css);
/style
/head
I have a function where I have:
?php
while (something())
{
if ($option1)
{ do_1(); }
elseif ($option2)
{ do_2(); }
// ... continue for 10 or more options...
}
?
would it be quicker to do the above code or:
if ($option1)
{
while(something())
{ do_1(); }
}
elseif ($option2)
{
[snip]
?php
if ($option1)
{
while(something())
{ do_1(); }
}
elseif ($option2)
{
while (something())
{ do_2(); }
}
// ... continue for 10 or more options...
[/snip]
Theoretically the second one is faster because it only executes the
while loop when the condition is met. The first one
;
}// end of
}
if ($option1)
{ do_1(); }
elseif ($option2)
{ do_2(); }
// ... continue for 10 or more options...
}
?
- Original Message -
From: Dan Anderson [EMAIL PROTECTED]
To: PHP List [EMAIL PROTECTED]
Sent: Wednesday, September 03, 2003 10:25 AM
Subject: [PHP] if else while
Stevie Peele wrote:
What is the difference between else if and elseif?
Thanks
_
STOP MORE SPAM with the new MSN 8 and get 2 months FREE*
http://join.msn.com/?page=features/junkmail
else if shouldn't be used, use elseif, and the
On Monday 30 June 2003 09:41 am, Tularis wrote:
Stevie Peele wrote:
What is the difference between else if and elseif?
Thanks
_
STOP MORE SPAM with the new MSN 8 and get 2 months FREE*
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
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 bizzare,
[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
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 == \\)
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
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
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
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!
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 then
Hi all,
Please can you help me with the following:
If got a little sample code:
This one is working (!):
?php
$vname=$_POST['vname'];
echo hello $vname;
?
form action=? echo ($_SERVER['PHP_SELF']); ? method=post
table
trtdInput yourname/tdtdinput type=text name=vname/td/tr
trtd colspan=2input
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:
?php
$vname=$_POST['vname'];
if($submit) {
Try some basic
, 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
but when i submit that form: The $vname doen't display..
Here is the code
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 helping
: 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:18, Frank Keessen wrote:
The register_globals = Off. Dit the basic echo
/tdtdinput type=text name=vname/td/tr
trtd colspan=2input type=submit name=submit/td/tr
/table
/form
?php
}
?
Rich
-Original Message-
From: Frank Keessen [mailto:[EMAIL PROTECTED]]
Sent: 25 January 2003 11:33
To: Johannes Schlueter; [EMAIL PROTECTED]
Subject: Re: [PHP] If... Else.. I'm not getting
: 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?
?php
if(isset($_POST['submit'])) {
$vname=$_POST['vname'];
echo hello $vname;
} else {
?
form action=? echo ($_SERVER['PHP_SELF
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['vname']).
ok, this is upload.php:
form enctype=multipart/form-data action=upload.php method=post
input type=hidden name=MAX_FILE_SIZE value=1000
Send this file: input name=userfile type=file
input type=submit value=Send File
/form
what else do i need to make afile upload?
--
PHP General Mailing List
?
Robbert van Andel
-Original Message-
From: Tweak2x [mailto:Tweak2x;Carolina.rr.com]
Sent: Friday, November 15, 2002 1:05 PM
To: [EMAIL PROTECTED]
Subject: [PHP] what else do i need in this upload script?
ok, this is upload.php:
form enctype=multipart/form-data action=upload.php method=post
On Saturday 16 November 2002 05:04, Tweak2x wrote:
ok, this is upload.php:
form enctype=multipart/form-data action=upload.php method=post
input type=hidden name=MAX_FILE_SIZE value=1000
Send this file: input name=userfile type=file
input type=submit value=Send File
/form
what else do i
it dosnt work for me
- Original Message -
From: Jason Wong [EMAIL PROTECTED]
Newsgroups: php.general
To: [EMAIL PROTECTED]
Sent: Friday, November 15, 2002 4:20 PM
Subject: Re: [PHP] what else do i need in this upload script?
On Saturday 16 November 2002 05:04, Tweak2x wrote:
ok
On Saturday 16 November 2002 06:54, tweak2x wrote:
it dosnt work for me
sigh
http://marc.theaimsgroup.com/?l=php-generalm=103678340124082w=2
--
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design Hosting * Internet Intranet Applications
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
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
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 this.
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 ($var1)
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 exactly 1
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
multiple statements as one, surround them with {curly braces}. I'm
guessing yo
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.
Natalie Leotta [EMAIL PROTECTED] wrote
xpertise, 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.
Natali
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 service thinkg it may have been because
01c1eae9$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 23, 2002 1:05 PM
Subject: Re: [PHP] If else question
I just looked at my hosting servic
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
001d01c1eae9$d58f4360$[EMAIL
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, including database access
statements.
We can't help you if you expect us to read
]]
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.
Jennifer
-Bd
]
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
001d01c1eae9$d58f4360$[EMAIL
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, type FROM
www.PHPBeginner.com // where PHP Begins
-Original Message-
From: Jennifer Downey [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 23, 2002 7:48 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] If else question
Ok you asked for it.
Don't say I didn't warn you.
session_start();
$query
To: [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_fetch_array($ret)) {
$user = $row['name
you'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]]
Sent: Tuesday, April 23, 2002 7:48 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP
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 it.
Don't say I didn't warn you.
session_start
]
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 warn you.
session_start();
$query = SELECT name FROM {$config[prefix]}_users WHERE
uid={$session[uid]};
$ret = mysql_query($query);
while($row
Jennifer, satus!
People are nervous here!
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 7:48 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP
rd, have you printed 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 y
eveloper
www.PHPBeginner.com // where PHP Begins
-Original Message-
From: Jennifer Downey [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 23, 2002 7:48 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] If else question
Ok you asked for it.
Don't say I didn't warn you.
session_start();
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.
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 PROTECTED]
Betreff: Re: [PHP] If else question
Aeh, sorry - but is the 1 you test for actual
incerely,
Maxim Maletsky
Founder, Chief Developer
www.PHPBeginner.com // where PHP Begins
-Original Message-
From: Jennifer Downey [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 23, 2002 7:48 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] If else question
Ok y
Message -
From: Jennifer Downey [EMAIL PROTECTED]
Date: Tuesday, April 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"
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 FORM
Is it legal for an if...else statement to span PHP code blocks? Here's
an example:
?
$a = 0;
if ($a 5) {
$b = 50;
$c=500;
// Take a break from php and put in some HTML
?
HTML
HEAD/HEAD
BODYMORE HTML CODE HERE/BODY
/HTML
?
// Now back to the PHP code
$d = 250;
}
else {
-
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:
?
$a = 0;
if ($a 5) {
$b = 50;
$c=500;
// Take a break from php and put
On Thu, 14 Mar 2002, Brad Harriger wrote:
!-- snip --
?
// 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 not
I just developed a new site and some of the users that I have go to visit the site are
prompted (under IE only) to download a language pack. Not sure why and to top all
of that, the language pack it prompts them to download is blank Meaning the prompt
doesnt say what language pack.
So
Hmm Whats the web site address?
-GENESiS DESiGNS
-Sean Kennedy
-http://wwwgdesignsvcncom
--
PHP General Mailing List (http://wwwphpnet/)
To unsubscribe, visit: http://wwwphpnet/unsubphp
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:
? If ($varA == True) { ? //
Make sure you close the accolade afterwords in PHP -- other than that, yes,
it works just fine!
For example this should work just fine:
-
?
for ($i=0;$i10;$i++) {
if (!($i%3)) {
?
Found a multiple of three!
?
echo($i);
?br?
}
}
?
--
Bogdan
Robert Dyke wrote:
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?
? If ($varA == True) { ; ?
Miles
At 01:11 PM 12/23/2001 -0700, Robert Dyke wrote:
Hello:
In ASP I can write a Conditional statement like
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]
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 %
Translating this to
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
? If ($varA == True) { ?
! --- end of myinclude.php ---
! beginning of testfile.php ---
?
Include('myinclude.php');
?
1 - 100 of 106 matches
Mail list logo