Re: [PHP] Function -> Sending URL's

2001-01-11 Thread Alex Black
> function testPassVar($url) { > $name = "TEST"; > echo "Click"; > } > > $url = 'asdfasdf.php3?name=$company'; > testPassVar($url); > echo "This is a $name"; > ?> > $url = "asdfasdf.php3?name=$company"; you need double quotes for the $company to be eval'd also, $name is defined within a func

Re: [PHP] Function -> Sending URL's

2001-01-11 Thread Abe
d the actual address value onto the it. Thanks eveyone, Abe - Original Message - From: "Cal Evans" <[EMAIL PROTECTED]> To: "Abe" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, January 11, 2001 10:07 PM Subject: RE: [PHP] Function -> Sendi

RE: [PHP] Function -> Sending URL's

2001-01-11 Thread DanO
ginal Message- From: Abe [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 11, 2001 1:59 PM To: DanO; [EMAIL PROTECTED] Subject: Re: [PHP] Function -> Sending URL's Hey Dan You see in this example - the value of $company is coming from the script and not the function - I am trying to find

Re: [PHP] Function -> Sending URL's

2001-01-11 Thread Hsieh, Wen-Yang
d a way to do that. > > Thanks, > Abe > > - Original Message - > From: "DanO" <[EMAIL PROTECTED]> > To: "Abe" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> > Sent: Thursday, January 11, 2001 9:41 PM > Subject: RE: [PHP] Function -

RE: [PHP] Function -> Sending URL's

2001-01-11 Thread Cal Evans
t;=".$value; } $newURL = testPassVar("http://www.calevans.com?test=one","name","Cal"); Cal http://www.calevans.com -Original Message----- From: Abe [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 11, 2001 3:51 PM To: Cal Evans; [EMAIL PROTECTED] Subject

Re: [PHP] Function -> Sending URL's

2001-01-11 Thread Abe
[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, January 11, 2001 9:41 PM Subject: RE: [PHP] Function -> Sending URL's > > sorry, but i didn't fully understand what you are trying to do. > > you can also pass 2 variables to the function: > > funct

Re: [PHP] Function -> Sending URL's

2001-01-11 Thread Abe
variables) and letting them be dealt with by the function. Thanks, Abe - Original Message - From: "Cal Evans" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, January 11, 2001 9:40 PM Subject: RE: [PHP] Function -> Sending URL's > There's a

RE: [PHP] Function -> Sending URL's

2001-01-11 Thread DanO
[EMAIL PROTECTED]] Sent: Thursday, January 11, 2001 1:35 PM To: Abe; [EMAIL PROTECTED] Subject: RE: [PHP] Function -> Sending URL's you are assigning the variable within the function, then calling the function with the variable. this is a variable scoping issue. try this: Click"; }

Re: [PHP] Function -> Sending URL's

2001-01-11 Thread Abe
Message - From: "DanO" <[EMAIL PROTECTED]> To: "Abe" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, January 11, 2001 9:34 PM Subject: RE: [PHP] Function -> Sending URL's > > you are assigning the variable within the function, then c

RE: [PHP] Function -> Sending URL's

2001-01-11 Thread Cal Evans
There's a couple points here: 1: echo isn't what you want to do. You want to RETURN the value from you function. Try this: Click"; return "Click"; } $url = 'asdfasdf.php3'; $newURL = testPassVar($url); echo($newURL); echo "This is a $name"; ?> 2: in the last line, you try to echo $name. $n

RE: [PHP] Function -> Sending URL's

2001-01-11 Thread DanO
you are assigning the variable within the function, then calling the function with the variable. this is a variable scoping issue. try this: Click"; } $company = "TEST"; $url = 'asdfasdf.php3?name='.$company; testPassVar($url); ?> -Original Message- From: Abe [mailto:[EMAIL PROTECT