[PHP] Re: problem with code (almost fixed)

2002-11-19 Thread Tularis
Yan Grossman wrote:


Hi,
I fixed my code to handle forms using $_REQUEST. Just having problem with
the fields with multiple contents...
the one you have to call  like field[0], field[1],etc...

How do I use the brackets inside brackets?
my case is this:
Thanks.
I have fixed everything with $_REQUEST
but I am having problem with the multiple fields, like this:
$message .= (hotel =  . $_REQUEST['pac_hot[0]'] .  - .
$_REQUEST['pac_hot[1]'].  -  .$_REQUEST['pac_hot[2]'] .  -
.$_REQUEST['pac_hot[3]'] . \n);

How am I going to use the brackets inside the brackets?
Thanks



first, change this: $_REQUEST['pac_hot[0]'] to: $_REQUEST[$pac_hot[0]]
a single quote (  '  ) disallows variable-matching, meaning it won't 
replace $var by what it should be, it just leaves it as it where a real 
character it should show.

that should work on all your request array stuff hope this helps :)


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Re: problem with code (almost fixed)

2002-11-19 Thread Noor Dawod

 -Original Message-
 From: Tularis [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, November 19, 2002 12:45 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Re: problem with code (almost fixed)

 first, change this: $_REQUEST['pac_hot[0]'] to:
 $_REQUEST[$pac_hot[0]]
 a single quote (  '  ) disallows variable-matching, meaning it won't
 replace $var by what it should be, it just leaves it as it
 where a real
 character it should show.

 that should work on all your request array stuff hope
 this helps :)


That would not work if register_globals is not turned ON. Actually, if
it'd work, it's useless to use $_REQUEST as you already have the
variable available in the global space.

Noor


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: Problem with Code

2001-12-16 Thread Phillip Oertel

Phillip B. Bruce wrote:


 1. Is there any documentation that explains the differences between
 the versions of PHP?

php4 : much more fun ! go use it !
the documentation will tell you on each function page in which php 
version the fuction was first available.


 2. Does it matter when writing php code that you specifiy the file
 name in the following manner?  test.php3  test.php4 or whatever. 

since you have PHP v3, .php4 and .php will not be parsed at all (you 
will see your code plaintext in the browser).
the webserver can be set up to still have .php3 handled by PHP v3 and 
.php4 by PHP v4.
in any case, i think you should ask your ISP to upgrade  to PHP v4 ... 
3.0.9  when was that ?


 I have the following error:
 Fatal error: Call to unsupported or undefined function include_once() in
 include_fns.php3 on line 7
from http://www.php.net/manual/en/function.include-once.php :
include_once() was added in PHP 4.0.1pl2

phil.


-- 
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]