Basically, you want to do is evaluate if they entered anything for each
item, and if so, print an additional line to the message.
Explanation:
$message .= "blah"; appends "blah" onto the end of the string $message
\n is a new line (I dunno, you might be a newbie!!)
If they entered 2 hamburgers
switch the isset() with !empty()
At 21:51 20/11/01 +0100, Raymond Lilleodegard wrote:
>It works after modifying it a little. BUT... :) It lists all the variables
>even if they aren't given any value. Is it possible to only get the defined
>ones?
>
>Regards Raymond
>
>
>"Matthew Luchak" <[EMAIL PR
2001, Matthew Luchak wrote:
>
> try &&($val!="") instead of &&(isset($var)
>
> Matthew Luchak
> Webmaster
> Kaydara Inc.
> [EMAIL PROTECTED]
>
>
> -Original Message-
> From: Raymond Lilleodegard [mailto:[EMA
al!="") instead of &&(isset($var)
Matthew Luchak
Webmaster
Kaydara Inc.
[EMAIL PROTECTED]
-Original Message-
From: Raymond Lilleodegard [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 20, 2001 3:52 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Re: A tricky one?
It works after
If you only want to show the ones variables that have values input by
the user, you could do this with the while loop:
while (list($var, $val) = each($HTTP_POST_VARS)) {
if ((strlen($val) > 0) && ($var !="email") && ($var !="SUBMIT") &&
(isset($var)) {
$message .= "$val
OTECTED]
Subject: Re: [PHP] Re: A tricky one?
It works after modifying it a little. BUT... :) It lists all the
variables
even if they aren't given any value. Is it possible to only get the
defined
ones?
Regards Raymond
"Matthew Luchak" <[EMAIL PROTECTED]> wrote in message
[E
It works after modifying it a little. BUT... :) It lists all the variables
even if they aren't given any value. Is it possible to only get the defined
ones?
Regards Raymond
"Matthew Luchak" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
how about...
__
how about...
Matthew Luchak
Webmaster
Kaydara Inc.
[EMAIL PROTECTED]
-Original Message-
From: Raymond Lilleodegard [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 20, 2001 1:57 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Re: A tricky one?
Thanks for a
8 matches
Mail list logo