473,748 Members | 10,539 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

special chars - why using GET results in trimmed variables?

Hi,

I'm trying to use GET method to pass variables through my script files.
Unfortunately, when a special char (&, ?, +) is being posted the
variable gets trimmed in a very strange way. I'm aware, that's connected
with the way the GET method passes variable values, but I don't know how
to make GET to take the variable value "as it is" without interpreting
special chars as special chars.

So, how should I send GET variables in order not to get them trimmed
when they contain special chars?

Thanks in advance for your hints.
Best regards
dd
Aug 15 '05 #1
4 2651
dutch disCo schrieb:
I'm trying to use GET method to pass variables through my script files.
Unfortunately, when a special char (&, ?, +) is being posted the

....

Hi,

i guess urlencode (http://de2.php.net/manual/en/function.urlencode.php)
will help you.
HIH
Jo
Aug 15 '05 #2
dutch disCo wrote:
Hi,

I'm trying to use GET method to pass variables through my script files.
Unfortunately, when a special char (&, ?, +) is being posted the
variable gets trimmed in a very strange way. I'm aware, that's connected
with the way the GET method passes variable values, but I don't know how
to make GET to take the variable value "as it is" without interpreting
special chars as special chars.

So, how should I send GET variables in order not to get them trimmed
when they contain special chars?

Thanks in advance for your hints.
Best regards
dd


This what your after?

http://au2.php.net/rawurlencode
Aug 15 '05 #3
Joachim Weiß napisa³(a):
i guess urlencode (http://de2.php.net/manual/en/function.urlencode.php)
will help you.


It was exactly what I needed. Thanks!
dd
Aug 15 '05 #4
dutch disCo wrote:
I'm trying to use GET method to pass variables through my script files.
Unfortunately, when a special char (&, ?, +) is being posted the
variable gets trimmed in a very strange way.


What's special about the question mark?

--
Jock
Aug 16 '05 #5

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

Similar topics

14
24119
by: tertius | last post by:
Is there a better way to append certain chars in a string with a backslash that the example below? chr = "#$%^&_{}" # special chars to look out for str = "123 45^ & 00 0_" # string to convert n = "" # init new string for i in str: if i in chr: # if special character in str n+='\\' # append it with a backslash n+=i
6
2791
by: Jonas Meurer | last post by:
hello, my script selects a comment saved as VARCHAR in MySQL and displays it inside an html page. the problem is, that the comment contains several special characters, as mysterious utf-8 hyphens, german umlauts, etc. i could write a function to parse the comment and substitute special chars with the relevant html code, but maybe this already exists in some
2
1645
by: Thorsten Viel | last post by:
Hi List, im trying to use special chars with the std::string (like S) but when i cout<< the string the special chars have disappeared. What's wrong here? Thanks in advance
2
32496
by: Mark Bosley | last post by:
i'm reading from a database and found special character showing up as \0 or &#x0;&#x0; when i serialize to xml. trim does not work and using the string.Replace doesn't either. how do i remove these?
11
2391
by: John | last post by:
Hi, I encountered a strange problem while debugging C code for a Windows-based application in LabWindows CVI V5.5, which led me to write the test code below. I tried this code with a different compiler and got the same erroneous result on two different PCs (with OS Win98 & Win98SE), so it appears to be a problem with ANSI C. I thought that negative double variables could be compared as easily and *reliably* as integers, but apparently...
6
15547
by: dwight | last post by:
I have a string that can't contain the following characters: ../\|}{[:;+=_)(*&^%$#@!~` What would be easiest way to check the string? Should I use regexp or create a array with these characters and compare each character of string to the array? Thanks
0
1424
by: hoenes1 | last post by:
Hi all, I have a standard html form containing several textboxes. Since this is a german application, the boxes are likely to contain special characters like ä, ö, ß, etc. The form is passed to the asp.net application via action="FormHandler.aspx" method="post". Evaluating the values in Request.Form.GetValues(key) yields the content of the textboxes omitting the special characters, for example typing "Rüdiger" (7 chars) in the form...
5
8630
by: Sakharam Phapale | last post by:
Hi All, I am using an API function, which takes file path as an input. When file path contains special characters (@,#,$,%,&,^, etc), API function gives an error as "Unable to open input file". Same file path containing special characters works fine in one machine, but doesn't work in other. I am using following API function to get short file path. Declare Auto Function GetShortPathName Lib "kernel32" (ByVal lpszLongPath As
5
4162
by: Alex | last post by:
Hi all - Is there a standard way to handle special chars in strings in dotnet? I'm using csharp and having two seperate problems... 1. Passing in args... I need to pass in an arg that points to a sqlserver2005 instance... it comes in looking like this in the debugger:
0
8991
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
8831
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
9325
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,...
0
8244
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6796
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
4607
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...
1
3315
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
2787
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2215
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.