PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old January 18th, 2005, 07:40 AM
cheewl cheewl is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Posts: 4 cheewl User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Unable to retain double quotes in url variable

Hi experts in here, I have a a slight problem on the below issue:

In http://www.turboscout.com I have this search box where you can enter search terms. However, If you enclose the search terms in double quotes, the search term cannot be transfered to the next page(with frames). Below are the codes:

<frame src="top.php?q=<?php echo $_GET['q']; ?>#">

This problem is because when the browser reads <frame src="top.php?q="hello world#", the url is truncated in the second " (at q="). Is there a way to work around it please?

Any attempt to add an escape character to <frame src="top.php?q=<?php echo $_GET['q']; ?>#"> will be useless because the browser will truncate the values after the double quotes in the variable q. i.e. if q="hello world" the following will happen:

<frame src="top.php?q=/" and that's it.

if you strip the slash, then this will happen:

<frame src="top.php?q="

The problem still exists...

Reply With Quote
  #2  
Old January 18th, 2005, 08:57 AM
MadCowDzz's Avatar
MadCowDzz MadCowDzz is offline
I'm Internet Famous
Dev Articles Frequenter (2500 - 2999 posts)
 
Join Date: Jan 2003
Location: Toronto, Canada
Posts: 2,890 MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Week 16 h 14 m 9 sec
Reputation Power: 8
Check out PHP's urlencode function.

Perhaps something like:
PHP Code:
<frame src="top.php?q=<?=urlencode("I like "quotes\"");?>#"> 

Reply With Quote
  #3  
Old January 18th, 2005, 08:59 AM
MadCowDzz's Avatar
MadCowDzz MadCowDzz is offline
I'm Internet Famous
Dev Articles Frequenter (2500 - 2999 posts)
 
Join Date: Jan 2003
Location: Toronto, Canada
Posts: 2,890 MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Week 16 h 14 m 9 sec
Reputation Power: 8
I put an escape character inbetween the words like and "quotes"
the forum seems to be taking it away...

Reply With Quote
  #4  
Old January 18th, 2005, 11:47 AM
cheewl cheewl is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Posts: 4 cheewl User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Hi! I thanks for your inputs, I have got it to work finally with 'urlencode' in php, and also 'escape' in javascript. Really appreciate your prompt reply

by the way, I would really appreciate if you can give me some comments on http://www.turboscout.com

Cheerios!

Reply With Quote
  #5  
Old January 18th, 2005, 12:39 PM
MadCowDzz's Avatar
MadCowDzz MadCowDzz is offline
I'm Internet Famous
Dev Articles Frequenter (2500 - 2999 posts)
 
Join Date: Jan 2003
Location: Toronto, Canada
Posts: 2,890 MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Week 16 h 14 m 9 sec
Reputation Power: 8
Although this discussion is out of scope of this thread:

I don't like how turboscout keeps its toolbar at the top of the page when I'm browsing a clicked link...

I'm not really searching all search engines at once, i still have to click the different engines...

Firefox already implements a simple feature, and there's no hijacking adbar on the top of my searched pages...

About.com has the same hijacking adbar feature... I don't like it... although theirs has the option to remove the bar... i don't see the same option on this bar.

Reply With Quote
  #6  
Old January 19th, 2005, 10:22 AM
cheewl cheewl is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Posts: 4 cheewl User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Quote:
Originally Posted by MadCowDzz
Although this discussion is out of scope of this thread:

I don't like how turboscout keeps its toolbar at the top of the page when I'm browsing a clicked link...

I'm not really searching all search engines at once, i still have to click the different engines...

Firefox already implements a simple feature, and there's no hijacking adbar on the top of my searched pages...

About.com has the same hijacking adbar feature... I don't like it... although theirs has the option to remove the bar... i don't see the same option on this bar.


Hi, I have included minimise, maximise & close functions in the top bar.

Instead of typing the same search terms in every engine, you type once now.

firefox only have a few search engines.

I really appreciate your suggestions, it has definitely made turboscout.com more user-friendly

Cheerios!
Weiliang

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingPHP Development > Unable to retain double quotes in url variable


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT