GIDForums  

Go Back   GIDForums > Computer Programming Forums > MySQL / PHP Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 11-Jun-2004, 16:43
ScreamingWeasel ScreamingWeasel is offline
New Member
 
Join Date: Jun 2004
Posts: 2
ScreamingWeasel is on a distinguished road

MATCH text without spaces


Hi,
I am attempting to do a full text search but have run into a problem as the field I am searching has been altered through the use of the javascript escape function and therefore has replaced all spaces with %20. This obviously means that the string is seen as one long word. I am quite new at PHP and mySQL so I am probably going the wrong way about things. If there is a more logical way to enter text containing special characters into the DB and then retrieve it using MATCH could you please let me know.

Thanks.
  #2  
Old 11-Jun-2004, 19:07
JdS's Avatar
JdS JdS is offline
Senior Member
 
Join Date: Aug 2001
Location: KUL, Malaysia
Posts: 3,371
JdS will become famous soon enough
Quote:
If there is a more logical way to enter text containing special characters into the DB and then retrieve it using MATCH could you please let me know

Hello ScreamingWeasel,

I think your script may be urlencoding a user-input data field that has already been urlencoded (i.e submitting a form with the GET method). What I mean by this is this:

If a user has submitted a form (and your form has submitted the data to your script via the GET method), the string data will be urlencoded...

So if the form field named "username" is submitted with a value like "John Smith" - in the address bar, it would look like "process.php?username=John%20Smith". But, when you are dealing with the data in PHP, the variable $_GET['username'] is still "John Smith"!

I suspect somewhere between these tasks, something in the script is 'urlencoding' the data again (before you inserted it into the database table)... if not please post some sample code off your form and script.
  #3  
Old 11-Jun-2004, 20:47
ScreamingWeasel ScreamingWeasel is offline
New Member
 
Join Date: Jun 2004
Posts: 2
ScreamingWeasel is on a distinguished road
Thanks for the reply,

I have just managed to sort out the problem myself and you will be pleased to know you were on the right path. :-P
 
 

Recent GIDBlogNARMY by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
burning problems PLEASE PLEASE HELP kelticeire Computer Hardware Forum 4 01-Dec-2006 15:39
CD burner wont burn!! robertli55 Computer Hardware Forum 1 18-Jun-2004 10:53
Yet another CD burner problem: Lite-On LSC-24082K Erwin Computer Hardware Forum 1 22-May-2004 11:28
CD Buring Failed skanth2000 Computer Hardware Forum 1 15-Nov-2003 03:52
text field problm zuzupus Web Design Forum 3 04-Sep-2003 05:18

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 15:47.


vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.