jim balthrop wrote:
> here is what i have now
>
<?=$highlightResults[($row_WADpr_parts["mfg_name"].$Value),
> REQUEST("S_mfg_name")]?>
$ is used to indicate a variable. highlightResults() is a
function, not
a variable. Parentheses are used for functions; square
brackets for
arrays. You have also got a weird combination of pseudo-PHP
and ASP
styles in there. At a guess, what you're trying to write is
this:
<?= highlightResults($row_WADpr_part["mfg_name"],
$_REQUEST["S_mfg_name"]); ?>
However, in the interests of portability, I would suggest
using the full
PHP opening tag with echo instead of the shorthand <?=,
which isn't
supported on all servers:
<?php echo highlightResults($row_WADpr_part["mfg_name"],
$_REQUEST["S_mfg_name"]); ?>
$_REQUEST is a superglobal array that contains all the
variables from
GET (passed through a URL query string), POST (from a form
sent using
the post method), and cookies. If the information is always
coming from
the same source, it's better to use the dedicated superglobal
instead of
$_REQUEST. Replace $_REQUEST with $_GET for query string
variables, or
$_POST for form variables.
A possible gotcha is a configuration setting known as "magic
quotes".
Although magic quotes are now generally considered to be a
bad thing,
and are due to be removed from the next version of PHP, most
hosting
companies have magic quotes switched on. If magic quotes are
switched
on, and the values passed through a query string or form are
likely to
contain single or double quotes, you need to pass such values
to a
function called stripslashes(). If that's the case, the code
for a
variable passed through a query string becomes this:
<?php echo highlightResults($row_WADpr_part["mfg_name"],
stripslashes($_GET["S_mfg_name"])); ?>
--
David Powers, Adobe Community Expert
Author, "The Essential Guide to Dreamweaver CS3" (friends of
ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/