473,396 Members | 2,020 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Quotation marks in form input

I have a form which contains a field for "height".

If someone places an entry such as: 5'6" the form seems like it completely
empties that value.

It does NOT do this on my machine, but does on the client's machine, which
leads me to believe it is something with their php configuration.

Any ideas on what this is (and how I can work around it?)

TIA

--
Karl Groves
www.karlcore.com
Jul 27 '06 #1
6 2873
PTM
"Karl Groves" <ka**@NOSPAMkarlcore.comwrote in message
news:Xn****************************@216.196.97.136 ...
>I have a form which contains a field for "height".

If someone places an entry such as: 5'6" the form seems like it
completely
empties that value.

It does NOT do this on my machine, but does on the client's machine, which
leads me to believe it is something with their php configuration.

Any ideas on what this is (and how I can work around it?)

TIA

--
Karl Groves
www.karlcore.com
Sounds like something to do with the 'magic quotes' setting in the php.ini
file.
Unfortunately I'm not sure what effect it will have on their other php
scripts if you change the setting on it.
Search for:

get_magic_quotes_gpc
get_magic_quotes_runtime
set_magic_quotes_runtime

on www.php.net.

Hope this helps.
Phil
Jul 27 '06 #2
Add addslashes() function.

e.g:

$var = addslashes ($_GET["var"])

--
http://www.groupvita.com
http://www.immersivelounge.com

Karl Groves wrote:
I have a form which contains a field for "height".

If someone places an entry such as: 5'6" the form seems like it completely
empties that value.

It does NOT do this on my machine, but does on the client's machine, which
leads me to believe it is something with their php configuration.

Any ideas on what this is (and how I can work around it?)

TIA

--
Karl Groves
www.karlcore.com
Jul 28 '06 #3
Karl Groves wrote:
I have a form which contains a field for "height".

If someone places an entry such as: 5'6" the form seems like it completely
empties that value.

It does NOT do this on my machine, but does on the client's machine, which
leads me to believe it is something with their php configuration.

Any ideas on what this is (and how I can work around it?)

TIA
Hi, Karl,

Do you mean the data doesn't get passed to the script, or when it's
redisplayed the value doesn't get displayed? Or it isn't stored in the
database correctly?

If the latter, check out htmlentities(). That's its main purpose. It
changes " to &quot;, for example.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
Jul 28 '06 #4
Jerry Stuckle <js*******@attglobal.netwrote in
news:B8******************************@comcast.com:
Karl Groves wrote:
>I have a form which contains a field for "height".

If someone places an entry such as: 5'6" the form seems like it
completely empties that value.

It does NOT do this on my machine, but does on the client's machine,
which leads me to believe it is something with their php
configuration.

Any ideas on what this is (and how I can work around it?)

TIA

Hi, Karl,

Do you mean the data doesn't get passed to the script, or when it's
redisplayed the value doesn't get displayed? Or it isn't stored in
the database correctly?

If the latter, check out htmlentities(). That's its main purpose. It
changes " to &quot;, for example.
I haven't done any debugging yet. I think it is a magic_quotes_gpc issue.
It *looks* like the entire entry is getting deleted if it contains a
quotation mark ("). If the entry in that field doesn't contain the
quotation mark, everything is fine.

--
Karl Groves
www.karlcore.com
Jul 28 '06 #5
Karl Groves wrote:
Jerry Stuckle <js*******@attglobal.netwrote in
news:B8******************************@comcast.com:

>>Karl Groves wrote:
>>>I have a form which contains a field for "height".

If someone places an entry such as: 5'6" the form seems like it
completely empties that value.

It does NOT do this on my machine, but does on the client's machine,
which leads me to believe it is something with their php
configuration.

Any ideas on what this is (and how I can work around it?)

TIA

Hi, Karl,

Do you mean the data doesn't get passed to the script, or when it's
redisplayed the value doesn't get displayed? Or it isn't stored in
the database correctly?

If the latter, check out htmlentities(). That's its main purpose. It
changes " to &quot;, for example.


I haven't done any debugging yet. I think it is a magic_quotes_gpc issue.
It *looks* like the entire entry is getting deleted if it contains a
quotation mark ("). If the entry in that field doesn't contain the
quotation mark, everything is fine.
Do you use the Live HTTP Headers extension to Firefox? I've found it to
be invaluable in figuring out post problems.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
Jul 28 '06 #6
Rik
Jerry Stuckle wrote:
Karl Groves wrote:
>Jerry Stuckle <js*******@attglobal.netwrote in
news:B8******************************@comcast.com :

>>Karl Groves wrote:

I have a form which contains a field for "height".

If someone places an entry such as: 5'6" the form seems like it
completely empties that value.

It does NOT do this on my machine, but does on the client's
machine, which leads me to believe it is something with their php
configuration.

Any ideas on what this is (and how I can work around it?)

TIA
Hi, Karl,

Do you mean the data doesn't get passed to the script, or when it's
redisplayed the value doesn't get displayed? Or it isn't stored in
the database correctly?

If the latter, check out htmlentities(). That's its main purpose.
It changes " to &quot;, for example.


I haven't done any debugging yet. I think it is a magic_quotes_gpc
issue. It *looks* like the entire entry is getting deleted if it
contains a quotation mark ("). If the entry in that field doesn't
contain the quotation mark, everything is fine.
Do you use the Live HTTP Headers extension to Firefox? I've found it
to be invaluable in figuring out post problems.
Or just print_r($_REQUEST) and check what's there. If that's OK (and it
usually is), check your code.

Posting quotation marks is (almost) never the problem, only the code that
deals with it. Without that specific code, we can guess all we want, posting
the specific piece of code that handles it can give you a much more usefull
answer.

Grtz,
--
Rik Wasmus
Jul 29 '06 #7

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

Similar topics

1
by: NikkoW | last post by:
I need to assign a string to a variable but the text string includes quotation marks: Example: MyString = "He turned and said "Hello" before leaving." When the compiler hits the quotation...
8
by: Stephen Poley | last post by:
One disadvantage of using a simple text editor to produce HTML is that it is relatively time-consuming to put in the proper typographical quotation marks and dashes. A round tuit having arrived...
63
by: Tristan Miller | last post by:
Greetings. Do any popular browsers correctly support <q>, at least for Western languages? I've noticed that Mozilla uses the standard English double-quote character, ", regardless of the lang...
4
by: Thomas Miskiewicz | last post by:
Hi! Is using of a double quotation mark with a URL a problem? For example: http://myserver.com/query?field1=something&field2=test&params="field1=test1"+"field2=test2" Regards Thomas
7
by: Paradigm | last post by:
I am trying to create a recordset where some text fields are matching. The problem is that some of the text fields contain quotation marks. I have tried to create the sql string using replace eg....
6
by: mplogue | last post by:
I'm trying to build a function that reads each character in a string and converts it to an ASCII numerical value. So far, so good. However, I'm running into problems when dealing with quotation...
0
by: Aaron Deskins | last post by:
Hello all, I'm trying to set up a database to track articles and documents. I've created a Table to hold the information I need. I've set up one of the fields to hold the actual text of the...
3
by: Ufit | last post by:
Simple,dumm question - how to include quotation marks in the string? F.ex. "Data Source=.\SQLEXPRESS;AttachDbFilename="C:\client data.mdf";Integrated Security=True;User Instance=True" I get syntax...
31
by: The Bicycling Guitarist | last post by:
Hi. For many years I have been using &quot; for double quotation marks in the HTML code, but the opening and closing quotation marks render the same in my browser. I'm considering going through and...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
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
0
BarryA
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
tracyyun
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...
0
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,...
0
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...

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.