473,806 Members | 2,944 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

html special character in the when submit form

Hi all ,

I have a form that allow user to enter description , sometimes the
description value have html special character for example %20 and etc.

Inserting into the mysql database is ok , for example the description
in my table is 'wt%20%20'.

However . when i have href link which for instance
'../edit/id=wt%20%20' .

The mysql database cannot find the id in the table eventhough it
existed in the table.

How to overcome this special character issue ?

Thanks

Aug 24 '06 #1
2 2878
we********@gmai l.com wrote:
I have a form that allow user to enter description , sometimes the
description value have html special character for example %20 and etc.

Inserting into the mysql database is ok , for example the description
in my table is 'wt%20%20'.

However . when i have href link which for instance
'../edit/id=wt%20%20' .

The mysql database cannot find the id in the table eventhough it
existed in the table.
%20 in a URL path means a space. To use a percent sign as data,
percent-encode it as %25.

.../edit/id=wt%2520%2520

--
Jock

Aug 24 '06 #2
*** we********@gmai l.com escribió/wrote (24 Aug 2006 01:14:18 -0700):
However . when i have href link which for instance
'../edit/id=wt%20%20' .

The mysql database cannot find the id in the table eventhough it
existed in the table.
Some characters like % have a special meaning in URLs. You must escape any
text that you add to a URL, just as you do when you insert text into SQL or
HTML. In this case, the function is rawurlencode().
--
-+ http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
++ Mi sitio sobre programación web: http://bits.demogracia.com
+- Mi web de humor con rayos UVA: http://www.demogracia.com
--
Aug 24 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
2934
by: josh dismukes | last post by:
/// here is the code i'm getting a parse error on the last line of the code which /// is </html> any help will be much appreciated. <?php session_start ();
2
1517
by: Brad Esclavon | last post by:
I have a page that people (without technical knowledge) can upload and change news web links (via the php script) dynamically. It has worked fine on our other server, but this week we changed servers and now it doesnt. What it is doing is replicating the links (in no order - its not like my var is just getting duplicated) so that there are many duplicate links, but not all of them are. The links are stored in a textarea and when the form is...
3
17211
by: Barry Olly | last post by:
Hi, I'm working on a mini content management system and need help with dealing with special characters. The input are taken from html form which are then stored into a varchar column in oracle database. When i retrieve the data, some of the special characters have been changed to ??? and also
8
22756
by: Frank Ratzlow | last post by:
Hi folks, I have a list of entries where some entries contain the special character (quotes) within in the string. If I try to save this entry everything after the quotes is skipped. The reason for this is quite obvious, since the resulting html tag looks like this: <option value="go "again" selected="selected">nochmal &quot;go</option>
4
8410
by: VK | last post by:
09/30/03 Phil Powell posted his "Radio buttons do not appear checked" question. This question led to a long discussion about the naming rules applying to variables, objects, methods and properties in JavaScript/JScript and HTML/XML elements. Without trying to get famous :-) but thinking it would be interesting to others I decided to post the following summary: 1. Variable names in JavaScript/JScript
2
12983
by: Beat Richli | last post by:
Hello i have following problem with ASP (using Interdev, Win2003 Server): if a special character is entered in a textbox, ASP or the Client Browser (IE 6) seems to convert this character in HTML entities. eg characters on this site: http://unicode.e-workers.de/kyrillisch.php come back as eg Л . i'm not shure, where exactly this happens. it doesn't happen on ASP.NET sites though. the top of those documents looks
3
3724
by: Kathy | last post by:
Can someone help me with the code to take the data in four fields on an HTML form and add it to a table in a database on an intranet. Thanks to all who help! Kathy
6
2358
by: chernyshevsky | last post by:
How do I force IE to encode characters outside of the current code-page as HTML entities? Right now, when I enter some Cyrillic text into a ISO-8859-1 form, the text submitted ends up being CP1251. If I enter some Polish letters, the text is CP1252. This behavior is too weird! I need IE to do things one way and one way only.
14
1800
by: Zkidd | last post by:
I hired a designer to do a webpage and the code that they sent me back looks way too long. I am not a developer, but am reading up on web standards, and when I review the source code for web standard xhtml pages, everything looks concise. What I have does not. However, I do read that HTML tables are more robust than CSS because some browsers don't read CSS tables. So maybe, the code that I got, although is long, is worth it? Any...
0
9719
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10620
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10372
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7650
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6877
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5546
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5682
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4329
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3851
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.