Wade wrote:
$total= 0;
echo 'Your order was for the following:';
echo 'Entree: "' . $_POST . $Course1 . '"';
echo 'Dessert: "' . $_POST . $ListBox2 . '"';
foreach (array($Course1, $ListBox2) as $val)
{
if (ereg('[0-9]+', $val, $regs)) $total += $regs[0];
Howard
-Original Message-
From: Wade [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, 14 January 2003 5:56 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-WIN] initialize variables
01132003 2251 CST
Thanks Robert. I was close before. I had tried something similar but
just didnt get it straight. Have
e array. As such $_POST['Course1'] is the
replacement of $Course1.
Keep on trying.
Rob Howard
-Original Message-----
From: Wade [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, 14 January 2003 5:13 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-WIN] initialize variables
01132003 2203 CST
I tho
th the names of each of the POST
variables as Keys to the array. As such $_POST['Course1'] is the
replacement of $Course1.
Keep on trying.
Rob Howard
-Original Message-
From: Wade [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, 14 January 2003 5:13 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP
g concatenation?
Its a way ogf combining strings into one.
$string = 'Hello';
$string = $string . ' World';
echo $string;
would output 'Hello World'
-Original Message-
From: Wade [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, 14 January 2003 4:02 PM
To: [EMAIL PR
[EMAIL PROTECTED]
Subject: Re: [PHP-WIN] initialize variables
01132003 2059 CST
Sean,
Thats a new one for me. In the line below, what does the " ' .
$Entrees[0] . ' "> do?
The " . ", do they have some value or do they negate something?
echo
01132003 2059 CST
Sean,
Thats a new one for me. In the line below, what does the " ' .
$Entrees[0] . ' "> do?
The " . ", do they have some value or do they negate something?
echo '' . $Entrees[0] . '';
Wade
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://
Using double quotes ("), to create strings, PHP will handle any $ sign in
the string as a variable.. There are two ways around this.
$Entrees= array('Steak ($9)', 'Pizza ($7)', 'Pasta ($6)');
Or
$Entrees=array("Steak (\$9)", "Pizza (\$7)", "Pasta (\$6)");
also, when using echo in this context:
The variable is $_POST - PHP is case sensitive...
Mikey
> -Original Message-
> From: Wade [mailto:[EMAIL PROTECTED]]
> Sent: 13 January 2003 16:31
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP-WIN] initialize variables (was: Using the GET Method)
>
>
> 0113200
01132003 0826 CST
Ok. This code is right off the PHP.net site. I changed the
action="action.php" to action="form.php" only.
But, when I run the page I receive "Hi . You are years old." Only.
Is this because I have global_variables turned off, even through Im
using $_post?
Wade
**
PH
[mailto:[EMAIL PROTECTED]]
Sent: Monday, 13 January 2003 8:22 PM
To: Stephen Edmonds
Cc: PHP Windows Helplist
Subject: Re: [PHP-WIN] initialize variables (was: Using the GET Method)
Just wanted to say thanks to those of you who've helped me on this one! =)
Thanks...
One more question to clari
On Mon, 13 Jan 2003, Bobo Wieland wrote:
> Just wanted to say thanks to those of you who've helped me on this one! =)
> Thanks...
>
> One more question to clarify one thing, though:
>
> if someone is calling 'index.php' like this: 'index.php?i=10'
>
> and on that page I have:
>
> while ($i <= 10)
n.com/bobo/
www.elstudion.com
- Original Message -
From: "Stephen Edmonds" <[EMAIL PROTECTED]>
To: "Bobo Wieland" <[EMAIL PROTECTED]>
Cc: "PHP Windows Helplist" <[EMAIL PROTECTED]>
Sent: Sunday, January 12, 2003 4:15 PM
Subject: Re: [PHP-
- Original Message -
From: "Bobo Wieland" <[EMAIL PROTECTED]>
To: "Sean Malloy" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Sunday, January 12, 2003 2:59 PM
Subject: [PHP-WIN] initialize variables (was: Using the GET Method)
> Please, explain this to me, because I couldn't figure it o
14 matches
Mail list logo