Re: [PHP] Strings in URL

2001-03-26 Thread trogers

the href should be
print "http://www.contus.com/test_quote/quotepage.php3?site=$site&page=miniquote&;
subject=$headline'\">
I think..
Tom

At 09:41 PM 26/03/01 -0500, Claudia wrote:
>I am attempting to pass a string value via a URL.  I have tried using
>urlencode and ereg_replace--with no luck.
>
>Here is sample code:
>
>$headline=urlencode("$headline");
>print "='http://www.contus.com/test_quote/quotepage.php3?site=$site&page=miniquote&;
>subject=$headline'>Contact us for more information";
>
>Then in the quotepage.php3 file
>
>if( $page == "miniquote" )
>{
>
>print "Get A Quote";
>print "$subject";
>print "$site";
>
>INCLUDE "mini_quote.inc.php3";
>}
>
>--->The print "$subject"; line prints nothing.
>
>If I print $headline right after I assign the variable it prints correctly
>with +s in place of the blanks for this variable.
>
>Any suggestions?
>
>
>
>
>
>--
>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]


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




Re: [PHP] Strings in URL

2001-03-26 Thread CC Zona

In article <99ou1p$tif$[EMAIL PROTECTED]>,
 [EMAIL PROTECTED] ("Claudia") wrote:

> $headline=urlencode("$headline");
> print " ='http://www.contus.com/test_quote/quotepage.php3?site=$site&page=miniquote&;
> subject=$headline'>Contact us for more information";
> 
> Then in the quotepage.php3 file
> 
> if( $page == "miniquote" )
> {
> 
> print "Get A Quote";
> print "$subject";
> print "$site";
> 
> INCLUDE "mini_quote.inc.php3";
> }
> 
> --->The print "$subject"; line prints nothing.
> 
> If I print $headline right after I assign the variable it prints correctly
> with +s in place of the blanks for this variable.

By any chance is that "print" line occuring within a function?  The fact 
that it prints fine then becomes "blank" later sounds like a classic global 
scope vs. local scope symptom.

-- 
CC

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




Re: [PHP] Strings in URL

2001-03-26 Thread David Robley

On Tue, 27 Mar 2001 12:11, Claudia wrote:
> I am attempting to pass a string value via a URL.  I have tried using
> urlencode and ereg_replace--with no luck.
>
> Here is sample code:
>
> $headline=urlencode("$headline");
> print " ='http://www.contus.com/test_quote/quotepage.php3?site=$site&page=miniq
>uote& subject=$headline'>Contact us for more
> information";
>
> Then in the quotepage.php3 file
>
> if( $page == "miniquote" )
> {
>
> print "Get A Quote";
> print "$subject";
> print "$site";
>
> INCLUDE "mini_quote.inc.php3";
> }
>
> --->The print "$subject"; line prints nothing.
>
> If I print $headline right after I assign the variable it prints
> correctly with +s in place of the blanks for this variable.
>
> Any suggestions?

What appears in the first script as the text of the link when you 'view 
source'?

-- 
David Robley| WEBMASTER & Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
AusEinet| http://auseinet.flinders.edu.au/
Flinders University, ADELAIDE, SOUTH AUSTRALIA

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




RE: [PHP] Strings in URL

2001-03-26 Thread Jack Dempsey

I believe you have to urldecode. Try that and see what happens...

-jack

-Original Message-
From: Claudia [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 26, 2001 9:41 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Strings in URL


I am attempting to pass a string value via a URL.  I have tried using
urlencode and ereg_replace--with no luck.

Here is sample code:

$headline=urlencode("$headline");
print "Contact us for more information";

Then in the quotepage.php3 file

if( $page == "miniquote" )
{

print "Get A Quote";
print "$subject";
print "$site";

INCLUDE "mini_quote.inc.php3";
}

--->The print "$subject"; line prints nothing.

If I print $headline right after I assign the variable it prints correctly
with +s in place of the blanks for this variable.

Any suggestions?





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



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