Re: Re : [PHP] NETSCAPE screws QUERY STRING

From: Date: Sun, 04 Mar 2001 19:57:36 +0000
Subject: Re: Re : [PHP] NETSCAPE screws QUERY STRING
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-42521@lists.php.net to get a copy of this message
Where is the string 'value+value2' coming from? $myrow[title]? If it is coming from the db (I'm guessing - it seems a little strange to me that this would be your title, but in this code we're discussing there is no other possible source), and it has slashes in it, you may need to use stripslashes to get rid of the slashes. Also, why are you using printf, but not formatting your string at all? Why don't you just use echo? I assume we're still dealing with this line of code: printf("<a href=\"pro_page1.php3?title='".urlencode($myrow[title])."'\">") J on 3/4/01 12:20 PM, Thomas Edison Jr. at thomasedisonjr@yahoo.com wrote: > > Julian, > > i tried this out .... it's giving the single quotes in > the value... 'value+value2' > > and on the next page where i'm printing the > value...the backslashes are also being added in front > of single quotes : > > \'value value2\' > > where can i go from here? this has made the urlencode > function to work...only part left now... > > T. Edison jr. > > --- Julian Wood <woodj@ucalgary.ca> wrote: >> >> Try printf("<a >> > > href=\"pro_page1.php3?title='".urlencode($myrow[title])."'\">") >> >> J >> >> on 3/4/01 11:55 AM, Thomas Edison Jr. at >> thomasedisonjr@yahoo.com wrote: >> >>> >>> The urlencode() is working fine with an echo >> statement >>> & normal query string. >>> >>> But it's NOT working with complex query string in >>> printf() including $myrow[something] being picked >> up >>> by mySQL db. >>> >>> this works : >>> >>> <a href="add_pro_over.php3?title=<? echo >>> urlencode($title) ?>"> >>> >>> this doesn't work : >>> >>> printf("<a >>> >> > href=\"pro_page1.php3?title='urlencode($myrow[title])'\">") >>> >>> OR such combinations as given in the manual. I >> tried >>> out almost all!!! >>> >>> HELP!!!! >>> >>> T. Edison jr. >>> >> >> >> -- >> Julian Wood >> Learning Technologies and Digital Media >> University of Calgary >> >> >> >> -- >> PHP General Mailing List (http://www.php.net/) >> To unsubscribe, e-mail: >> php-general-unsubscribe@lists.php.net >> For additional commands, e-mail: >> php-general-help@lists.php.net >> To contact the list administrators, e-mail: >> php-list-admin@lists.php.net >> > > > ===== > Rahul S. Johari (Director) > ****************************************** > Abraxas Technologies Inc. > Homepage : http://www.abraxastech.com > Email : abraxastech@yahoo.com > Tel : 91-4546512/4522124 > ******************************************* > > __________________________________________________ > Do You Yahoo!? > Get email at your own domain with Yahoo! Mail. > http://personal.mail.yahoo.com/ -- Julian Wood Learning Technologies and Digital Media University of Calgary

« previous php.general (#42521) next »