I don't have a lot of experience using $_GET.
I need to know how to pass characters in using the $_GET method. The
character I'm having a problem with right now is '#', but I'm sure
there are others.
Could anyone give me a list of characters that need to be escaped
using $_GET, and then also how to use them?
Also, could you tell me if any characters simply are not allowed in a
get?
Example:
getData.php?type=edit&user=myName&item=Item#1
Thanks,
Chad 5 8212 ch***********@gmail.com wrote:
I don't have a lot of experience using $_GET.
I need to know how to pass characters in using the $_GET method. The
character I'm having a problem with right now is '#', but I'm sure
there are others.
Could anyone give me a list of characters that need to be escaped
using $_GET, and then also how to use them?
Also, could you tell me if any characters simply are not allowed in a
get?
Example:
getData.php?type=edit&user=myName&item=Item#1
Thanks,
Chad
urlencode() your parameters.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp. js*******@attglobal.net
==================
On Mar 19, 8:45 pm, Jerry Stuckle <jstuck...@attglobal.netwrote:
chad.a.mor...@gmail.com wrote:
I don't have a lot of experience using $_GET.
I need to know how to pass characters in using the $_GET method. The
character I'm having a problem with right now is '#', but I'm sure
there are others.
Could anyone give me a list of characters that need to be escaped
using $_GET, and then also how to use them?
Also, could you tell me if any characters simply are not allowed in a
get?
Example:
getData.php?type=edit&user=myName&item=Item#1
Thanks,
Chad
urlencode() your parameters.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstuck...@attglobal.net
==================- Hide quoted text -
- Show quoted text -
I'm trying to go from javascript (making the call) to php.
For example:
function getData()
{
var user = "user1" ;
var item = encodeURI( "Item #1" ) ;
xmlHttp.open( 'GET' , 'addData.php?user=' + user + '&item=' +
item ) ;
}
However, the encodeURI() function on the string give returns the
following:
Item%20#1
So, it is leaving the pound sign, which is messing me up.
Any other thoughts? Perhaps I'm not using the functions correctly?
Thanks for the help!
Chad ch***********@gmail.com wrote:
On Mar 19, 8:45 pm, Jerry Stuckle <jstuck...@attglobal.netwrote:
>chad.a.mor...@gmail.com wrote:
>>I don't have a lot of experience using $_GET. I need to know how to pass characters in using the $_GET method. The character I'm having a problem with right now is '#', but I'm sure there are others. Could anyone give me a list of characters that need to be escaped using $_GET, and then also how to use them? Also, could you tell me if any characters simply are not allowed in a get? Example: getData.php?type=edit&user=myName&item=Item#1 Thanks, Chad
urlencode() your parameters.
-- ================== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. jstuck...@attglobal.net ==================- Hide quoted text -
- Show quoted text -
I'm trying to go from javascript (making the call) to php.
For example:
function getData()
{
var user = "user1" ;
var item = encodeURI( "Item #1" ) ;
xmlHttp.open( 'GET' , 'addData.php?user=' + user + '&item=' +
item ) ;
}
However, the encodeURI() function on the string give returns the
following:
Item%20#1
So, it is leaving the pound sign, which is messing me up.
Any other thoughts? Perhaps I'm not using the functions correctly?
Thanks for the help!
Chad
Chad,
First of all, it's urlencode() - not encodeURI(). I have no idea what
that function does - it's not part of the PHP standard library.
And you're using AJAX - which is something completely different. Not
being an AJAX user myself, I can't say what your problem is. All I know
is I use urlencode() with some regularity and it works fine. I've also
tried strings with a '#' in them and it's OK.
The '#' is used in an href to indicate a tag (<a name=...>) on a page.
Perhaps AJAX is getting confused. I wouldn't know. Or maybe your
encodeURI() function isn't doing the same thing.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp. js*******@attglobal.net
================== ch***********@gmail.com wrote:
On Mar 19, 8:45 pm, Jerry Stuckle <jstuck...@attglobal.netwrote:
>chad.a.mor...@gmail.com wrote:
I don't have a lot of experience using $_GET.
I need to know how to pass characters in using the $_GET method. The
character I'm having a problem with right now is '#', but I'm sure
there are others.
Could anyone give me a list of characters that need to be escaped
using $_GET, and then also how to use them?
Also, could you tell me if any characters simply are not allowed in a
get?
Example:
getData.php?type=edit&user=myName&item=Item#1
Thanks,
Chad
urlencode() your parameters.
-- ================== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. jstuck...@attglobal.net ==================- Hide quoted text -
- Show quoted text -
I'm trying to go from javascript (making the call) to php.
For example:
function getData()
{
var user = "user1" ;
var item = encodeURI( "Item #1" ) ;
xmlHttp.open( 'GET' , 'addData.php?user=' + user + '&item=' +
item ) ;
}
However, the encodeURI() function on the string give returns the
following:
Item%20#1
So, it is leaving the pound sign, which is messing me up.
Any other thoughts? Perhaps I'm not using the functions correctly?
Indeed.
encodeURI leaves ; / ? : @ & = + $ , # all intact.
What you need in Javascript is escape(), not encodeURI().
Tip: Buy a good JS book and you never fall for this kind of thing again.
I recommend Javascript, the definitive guide, by Flanagan (O Reilly)
Regards,
Erwin Moller
>
Chad
On Mar 20, 11:20 am, Erwin Moller
<since_humans_read_this_I_am_spammed_too_m...@spam yourself.comwrote:
chad.a.mor...@gmail.com wrote:
On Mar 19, 8:45 pm, Jerry Stuckle <jstuck...@attglobal.netwrote:
chad.a.mor...@gmail.com wrote:
I don't have a lot of experience using $_GET.
I need to know how to pass characters in using the $_GET method. The
character I'm having a problem with right now is '#', but I'm sure
there are others.
Could anyone give me a list of characters that need to be escaped
using $_GET, and then also how to use them?
Also, could you tell me if any characters simply are not allowed in a
get?
Example:
getData.php?type=edit&user=myName&item=Item#1
Thanks,
Chad
urlencode() your parameters.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstuck...@attglobal.net
==================- Hide quoted text -
- Show quoted text -
I'm trying to go from javascript (making the call) to php.
For example:
function getData()
{
var user = "user1" ;
var item = encodeURI( "Item #1" ) ;
xmlHttp.open( 'GET' , 'addData.php?user=' + user + '&item=' +
item ) ;
}
However, the encodeURI() function on the string give returns the
following:
Item%20#1
So, it is leaving the pound sign, which is messing me up.
Any other thoughts? Perhaps I'm not using the functions correctly?
Indeed.
encodeURI leaves ; / ? : @ & = + $ , # all intact.
What you need in Javascript is escape(), not encodeURI().
Tip: Buy a good JS book and you never fall for this kind of thing again.
I recommend Javascript, the definitive guide, by Flanagan (O Reilly)
Regards,
Erwin Moller
Chad- Hide quoted text -
- Show quoted text -- Hide quoted text -
- Show quoted text -
Thanks for the help Erwin and Jerry. I will definitely check out the
book you mentioned. I'm finding that the more in depth that I go, the
better off I'd be with a book.
THANKS!! This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: BTnews |
last post by:
Hi,
Can anyone here point me at a definitive guide or tutorial about using
escape characters when building SQL queries from user entered data?
I'm especially interested in info on this in regard...
|
by: teachtiro |
last post by:
Hi,
'C' says \ is the escape character to be used when characters are
to be interpreted in an uncommon sense, e.g. \t usage in printf(),
but for printing % through printf(), i have read that %%...
|
by: Steve Litvack |
last post by:
Hello,
I have built an XMLDocument object instance and I get the following string
when I examine the InnerXml property:
<?xml version=\"1.0\"?><ROOT><UserData UserID=\"2282\"><Tag1...
|
by: Guadala Harry |
last post by:
I need to place the following into a string... How can I properly escape the
% " / < and > characters?
<table width="100%" border="0" cellspacing="0" cellpadding="4px"
class="hfAll"></Table>
...
|
by: Guadala Harry |
last post by:
I'd like to know the answer to the following question so I can know what to
expect with regard to other similar uses of escape characters and strings.
While everything works fine - I'd like to know...
|
by: Mike Cooper |
last post by:
Hi everyone,
I am accessing several binary (PCL) files sequentially using a for
loop. For each file I am using the fileget() command to populate the
contents of the file into a string. I use...
|
by: Jim Carlock |
last post by:
Does PHP provide a function to extract the rightmost characters
from a string?
For example, the VB/ASP equivalent...
sStateAbbr = Right$(sCityState, 2)
Thanks.
Jim Carlock
|
by: pkaeowic |
last post by:
I am having a problem with the "escape" character \e. This code is in my
Windows form KeyPress event. The compiler gives me "unrecognized escape
sequence" even though this is documented in MSDN....
|
by: Lawrence D'Oliveiro |
last post by:
The "escape" function in the "cgi" module escapes characters with special
meanings in HTML. The ones that need escaping are '<', '&' and '"'.
However, cgi.escape only escapes the quote character if...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
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...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
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...
| |