Re: Strings in URL

From: Date: Tue, 27 Mar 2001 02:53:48 +0000
Subject: Re: Strings in URL
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-45684@lists.php.net to get a copy of this message
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 "<a href > > ='http://www.contus.com/test_quote/quotepage.php3?site=$site&page=miniq >uote& subject=$headline'><b>Contact us for more > information</b></a></font>"; > > Then in the quotepage.php3 file > > if( $page == "miniquote" ) > { > > print "Get A Quote<br>"; > 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

« previous php.general (#45684) next »